Update Debian package

This commit is contained in:
2025-07-06 00:24:44 +00:00
parent bf80fd057d
commit 9a1d39a4e8
10 changed files with 28 additions and 28 deletions

4
.gitignore vendored
View File

@ -1,10 +1,10 @@
router_backup ipng-router-backup
# Debian packaging artifacts # Debian packaging artifacts
debian/.debhelper/ debian/.debhelper/
debian/.gocache/ debian/.gocache/
debian/go/ debian/go/
debian/router-backup/ debian/ipng-router-backup/
debian/*.substvars debian/*.substvars
debian/debhelper-build-stamp debian/debhelper-build-stamp
debian/*.debhelper debian/*.debhelper

View File

@ -1,7 +1,7 @@
# Router Backup Tool Makefile # Router Backup Tool Makefile
# Variables # Variables
BINARY_NAME=router_backup BINARY_NAME=ipng-router-backup
SOURCE_DIR=src SOURCE_DIR=src
BUILD_DIR=. BUILD_DIR=.
GO_FILES=$(SOURCE_DIR)/router_backup.go GO_FILES=$(SOURCE_DIR)/router_backup.go

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
router-backup (1.0.0) stable; urgency=low ipng-router-backup (1.0.0) stable; urgency=low
* Initial release * Initial release
* SSH Router Backup Tool with YAML configuration * SSH Router Backup Tool with YAML configuration

4
debian/control vendored
View File

@ -1,11 +1,11 @@
Source: router-backup Source: ipng-router-backup
Section: net Section: net
Priority: optional Priority: optional
Maintainer: Pim van Pelt <pim@ipng.ch> Maintainer: Pim van Pelt <pim@ipng.ch>
Build-Depends: debhelper-compat (= 12), golang-go Build-Depends: debhelper-compat (= 12), golang-go
Standards-Version: 4.5.0 Standards-Version: 4.5.0
Package: router-backup Package: ipng-router-backup
Architecture: amd64 Architecture: amd64
Depends: ${shlibs:Depends}, ${misc:Depends}, openssh-client Depends: ${shlibs:Depends}, ${misc:Depends}, openssh-client
Description: SSH Router Backup Tool Description: SSH Router Backup Tool

View File

@ -1 +1 @@
router-backup ipng-router-backup

4
debian/files vendored
View File

@ -1,2 +1,2 @@
router-backup_1.0.0_amd64.buildinfo net optional ipng-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.deb net optional

4
debian/postinst vendored
View File

@ -1,3 +1,3 @@
#!/bin/bash #!/bin/bash
echo 'Router Backup installed successfully.' echo 'IPNG Router Backup installed successfully.'
echo 'Example config at /etc/router-backup/config.yaml.example' echo 'Example config at /etc/ipng-router-backup/config.yaml.example'

18
debian/rules vendored
View File

@ -4,19 +4,19 @@
dh $@ dh $@
override_dh_auto_build: 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: override_dh_auto_install:
mkdir -p debian/router-backup/usr/bin mkdir -p debian/ipng-router-backup/usr/bin
mkdir -p debian/router-backup/etc/router-backup mkdir -p debian/ipng-router-backup/etc/ipng-router-backup
mkdir -p debian/router-backup/usr/share/man/man1 mkdir -p debian/ipng-router-backup/usr/share/man/man1
cp router_backup debian/router-backup/usr/bin/ cp ipng-router-backup debian/ipng-router-backup/usr/bin/
cp config.yaml debian/router-backup/etc/router-backup/config.yaml.example cp config.yaml debian/ipng-router-backup/etc/ipng-router-backup/config.yaml.example
cp docs/router_backup.1 debian/router-backup/usr/share/man/man1/ cp docs/router_backup.1 debian/ipng-router-backup/usr/share/man/man1/ipng-router-backup.1
gzip debian/router-backup/usr/share/man/man1/router_backup.1 gzip debian/ipng-router-backup/usr/share/man/man1/ipng-router-backup.1
override_dh_auto_clean: override_dh_auto_clean:
rm -f router_backup rm -f ipng-router-backup
override_dh_auto_test: override_dh_auto_test:
# Skip tests for now # Skip tests for now

View File

@ -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 .SH NAME
router_backup \- SSH Router Backup Tool ipng-router-backup \- SSH Router Backup Tool
.SH SYNOPSIS .SH SYNOPSIS
.B router_backup .B ipng-router-backup
.RI --config " CONFIG_FILE" .RI --config " CONFIG_FILE"
.RI [ --output-dir " DIRECTORY" ] .RI [ --output-dir " DIRECTORY" ]
.RI [ --password " PASSWORD" ] .RI [ --password " PASSWORD" ]
@ -69,21 +69,21 @@ For each device, a text file named after the hostname is created in the specifie
.TP .TP
Basic usage: Basic usage:
.EX .EX
router_backup --config /etc/router-backup/config.yaml ipng-router-backup --config /etc/ipng-router-backup/config.yaml
.EE .EE
.TP .TP
Custom output directory: Custom output directory:
.EX .EX
router_backup --config config.yaml --output-dir /home/user/backups ipng-router-backup --config config.yaml --output-dir /home/user/backups
.EE .EE
.TP .TP
Using password authentication: Using password authentication:
.EX .EX
router_backup --config config.yaml --password mysecretpass ipng-router-backup --config config.yaml --password mysecretpass
.EE .EE
.SH FILES .SH FILES
.TP .TP
.I /etc/router-backup/config.yaml.example .I /etc/ipng-router-backup/config.yaml.example
Example configuration file Example configuration file
.SH EXIT STATUS .SH EXIT STATUS
.TP .TP

View File

@ -223,7 +223,7 @@ func main() {
var outputDir string var outputDir string
var rootCmd = &cobra.Command{ var rootCmd = &cobra.Command{
Use: "router_backup", Use: "ipng-router-backup",
Short: "SSH Router Backup Tool", Short: "SSH Router Backup Tool",
Long: "Connects to routers via SSH and runs commands, saving output to local files.", Long: "Connects to routers via SSH and runs commands, saving output to local files.",
Run: func(cmd *cobra.Command, args []string) { Run: func(cmd *cobra.Command, args []string) {