diff --git a/.gitignore b/.gitignore index ffd4982..7ed0d59 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,10 @@ -router_backup +ipng-router-backup # Debian packaging artifacts debian/.debhelper/ debian/.gocache/ debian/go/ -debian/router-backup/ +debian/ipng-router-backup/ debian/*.substvars debian/debhelper-build-stamp debian/*.debhelper diff --git a/Makefile b/Makefile index 808e9e5..269304b 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # Router Backup Tool Makefile # Variables -BINARY_NAME=router_backup +BINARY_NAME=ipng-router-backup SOURCE_DIR=src BUILD_DIR=. GO_FILES=$(SOURCE_DIR)/router_backup.go diff --git a/debian/changelog b/debian/changelog index be1b351..2d107b2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -router-backup (1.0.0) stable; urgency=low +ipng-router-backup (1.0.0) stable; urgency=low * Initial release * SSH Router Backup Tool with YAML configuration diff --git a/debian/control b/debian/control index 9afb4b4..826a0f7 100644 --- a/debian/control +++ b/debian/control @@ -1,11 +1,11 @@ -Source: router-backup +Source: ipng-router-backup Section: net Priority: optional Maintainer: Pim van Pelt Build-Depends: debhelper-compat (= 12), golang-go Standards-Version: 4.5.0 -Package: router-backup +Package: ipng-router-backup Architecture: amd64 Depends: ${shlibs:Depends}, ${misc:Depends}, openssh-client Description: SSH Router Backup Tool diff --git a/debian/debhelper-build-stamp b/debian/debhelper-build-stamp index b5b4f2c..127645d 100644 --- a/debian/debhelper-build-stamp +++ b/debian/debhelper-build-stamp @@ -1 +1 @@ -router-backup +ipng-router-backup diff --git a/debian/files b/debian/files index 6ffaba7..2767bf9 100644 --- a/debian/files +++ b/debian/files @@ -1,2 +1,2 @@ -router-backup_1.0.0_amd64.buildinfo net optional -router-backup_1.0.0_amd64.deb net optional +ipng-router-backup_1.0.0_amd64.buildinfo net optional +ipng-router-backup_1.0.0_amd64.deb net optional diff --git a/debian/postinst b/debian/postinst index 8645242..746217f 100755 --- a/debian/postinst +++ b/debian/postinst @@ -1,3 +1,3 @@ #!/bin/bash -echo 'Router Backup installed successfully.' -echo 'Example config at /etc/router-backup/config.yaml.example' \ No newline at end of file +echo 'IPNG Router Backup installed successfully.' +echo 'Example config at /etc/ipng-router-backup/config.yaml.example' \ No newline at end of file diff --git a/debian/rules b/debian/rules index 50d0835..7655fa0 100755 --- a/debian/rules +++ b/debian/rules @@ -4,19 +4,19 @@ dh $@ override_dh_auto_build: - cd src && go build -o ../router_backup router_backup.go + cd src && go build -o ../ipng-router-backup router_backup.go override_dh_auto_install: - mkdir -p debian/router-backup/usr/bin - mkdir -p debian/router-backup/etc/router-backup - mkdir -p debian/router-backup/usr/share/man/man1 - cp router_backup debian/router-backup/usr/bin/ - cp config.yaml debian/router-backup/etc/router-backup/config.yaml.example - cp docs/router_backup.1 debian/router-backup/usr/share/man/man1/ - gzip debian/router-backup/usr/share/man/man1/router_backup.1 + mkdir -p debian/ipng-router-backup/usr/bin + mkdir -p debian/ipng-router-backup/etc/ipng-router-backup + mkdir -p debian/ipng-router-backup/usr/share/man/man1 + cp ipng-router-backup debian/ipng-router-backup/usr/bin/ + cp config.yaml debian/ipng-router-backup/etc/ipng-router-backup/config.yaml.example + cp docs/router_backup.1 debian/ipng-router-backup/usr/share/man/man1/ipng-router-backup.1 + gzip debian/ipng-router-backup/usr/share/man/man1/ipng-router-backup.1 override_dh_auto_clean: - rm -f router_backup + rm -f ipng-router-backup override_dh_auto_test: # Skip tests for now diff --git a/docs/router_backup.1 b/docs/router_backup.1 index e74fcb7..5de12cc 100644 --- a/docs/router_backup.1 +++ b/docs/router_backup.1 @@ -1,8 +1,8 @@ -.TH ROUTER_BACKUP 1 "July 2025" "router-backup 1.0.0" "User Commands" +.TH IPNG-ROUTER-BACKUP 1 "July 2025" "ipng-router-backup 1.0.0" "User Commands" .SH NAME -router_backup \- SSH Router Backup Tool +ipng-router-backup \- SSH Router Backup Tool .SH SYNOPSIS -.B router_backup +.B ipng-router-backup .RI --config " CONFIG_FILE" .RI [ --output-dir " DIRECTORY" ] .RI [ --password " PASSWORD" ] @@ -69,21 +69,21 @@ For each device, a text file named after the hostname is created in the specifie .TP Basic usage: .EX -router_backup --config /etc/router-backup/config.yaml +ipng-router-backup --config /etc/ipng-router-backup/config.yaml .EE .TP Custom output directory: .EX -router_backup --config config.yaml --output-dir /home/user/backups +ipng-router-backup --config config.yaml --output-dir /home/user/backups .EE .TP Using password authentication: .EX -router_backup --config config.yaml --password mysecretpass +ipng-router-backup --config config.yaml --password mysecretpass .EE .SH FILES .TP -.I /etc/router-backup/config.yaml.example +.I /etc/ipng-router-backup/config.yaml.example Example configuration file .SH EXIT STATUS .TP diff --git a/src/router_backup.go b/src/router_backup.go index 300294f..89ed1d2 100644 --- a/src/router_backup.go +++ b/src/router_backup.go @@ -223,7 +223,7 @@ func main() { var outputDir string var rootCmd = &cobra.Command{ - Use: "router_backup", + Use: "ipng-router-backup", Short: "SSH Router Backup Tool", Long: "Connects to routers via SSH and runs commands, saving output to local files.", Run: func(cmd *cobra.Command, args []string) {