Update Debian package
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@ -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
|
||||
|
2
Makefile
2
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
|
||||
|
2
debian/changelog
vendored
2
debian/changelog
vendored
@ -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
|
||||
|
4
debian/control
vendored
4
debian/control
vendored
@ -1,11 +1,11 @@
|
||||
Source: router-backup
|
||||
Source: ipng-router-backup
|
||||
Section: net
|
||||
Priority: optional
|
||||
Maintainer: Pim van Pelt <pim@ipng.ch>
|
||||
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
|
||||
|
2
debian/debhelper-build-stamp
vendored
2
debian/debhelper-build-stamp
vendored
@ -1 +1 @@
|
||||
router-backup
|
||||
ipng-router-backup
|
||||
|
4
debian/files
vendored
4
debian/files
vendored
@ -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
|
||||
|
4
debian/postinst
vendored
4
debian/postinst
vendored
@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
echo 'Router Backup installed successfully.'
|
||||
echo 'Example config at /etc/router-backup/config.yaml.example'
|
||||
echo 'IPNG Router Backup installed successfully.'
|
||||
echo 'Example config at /etc/ipng-router-backup/config.yaml.example'
|
18
debian/rules
vendored
18
debian/rules
vendored
@ -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
|
||||
|
@ -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
|
||||
|
@ -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) {
|
||||
|
Reference in New Issue
Block a user