Commit graph

70 commits

Author SHA1 Message Date
Victor LABORIE d09d0b0572 Do not create dirs in bkctld script 2019-01-08 16:29:03 +01:00
Victor LABORIE 183bc05ec4 Use bkctld-list script for jails listing 2019-01-08 16:23:46 +01:00
Victor LABORIE d9f8ae7036 Move check_jail_on functions into bkctld-is-on script 2019-01-07 16:34:44 +01:00
Victor LABORIE 0272c43751 Move usage functions into bkctld-help script
* Usage output is now auto-generated
2019-01-07 14:47:07 +01:00
Victor LABORIE d0165a9e3c Move firewall functions into bkctld-firewall script 2019-01-04 16:55:56 +01:00
Victor LABORIE 1522d2f6cd Merge bkctld-params and some functions into bkctld-(ip|port|key) scripts 2019-01-04 16:39:35 +01:00
Victor LABORIE 6caa9078e6 Parallelize bkctld <subcommand> all 2019-01-04 16:03:33 +01:00
Victor LABORIE e062a05a4b Split bkctld into multiples scripts 2019-01-04 13:52:15 +01:00
Victor LABORIE ee34be5fec btrfs is now in /bin 2018-12-04 16:11:00 +01:00
Victor LABORIE f1be9e7132 Check if disk is mounted in bkctld check 2018-11-29 17:04:40 +01:00
Victor LABORIE 958eeb8776 Use absolute PATH for btrfs command
* Because command -v fail in some cases
2018-07-04 14:48:36 +02:00
Victor LABORIE 1b3b68ba16 Fix last update date of stats index file 2018-06-13 18:21:31 +02:00
Victor LABORIE a835491703 Add incs info to stats 2018-06-13 18:01:43 +02:00
Victor LABORIE f780d4d94a Add stats subcommands 2018-06-13 15:22:21 +02:00
Victor LABORIE b1400c83b6 Better bkctld check output 2018-05-30 18:30:15 +02:00
Victor LABORIE dcba6d5634 Merge check_nrpe into bkctld check subcommand 2018-05-30 16:39:26 +02:00
Victor LABORIE 2893953ec0 Reload when update params 2018-03-28 14:09:22 +02:00
Victor LABORIE 685b70b632 Fix reload 2018-03-27 18:35:06 +02:00
Victor LABORIE 3c12286704 Double quote all vars and add brackets 2018-03-27 18:22:31 +02:00
Victor LABORIE fa27759cad Force variables definition and add a set -u 2018-03-27 17:11:25 +02:00
Victor LABORIE d565374c5d Retab 2018-03-27 16:39:03 +02:00
Victor LABORIE 0927e79954 Use cat instead of echo for usage function 2018-03-27 16:31:50 +02:00
Victor LABORIE 8680b742dd Refactoring of logging and notification
* Use logger command, no longer write directly to logfile
* Loglevel can be set in bkctld.conf
* Remove mail notification, cronjob do it when stdout/stderr
2018-03-27 16:14:39 +02:00
Victor LABORIE 3b40cb19d9 Fix bkctld logging on non interactive usage 2017-12-04 11:49:45 +01:00
Victor LABORIE dbea4d46b1 Use touch instead of lastlog in sshrc
Because lastlog -S doesn't work on Debian Jessie
lastlog: invalid option -- 'S'
2017-08-30 17:24:45 +02:00
Victor LABORIE fc7229fe9f Clean jail before creating it 2017-08-30 17:24:45 +02:00
Victor LABORIE 9606b23d97 Update lastlog even on non interactive ssh (eg. with rsync) 2017-08-30 17:24:45 +02:00
Victor LABORIE 985c72194a Fix /var/run to /run symlink 2017-08-30 17:24:45 +02:00
Benoît S. 2f8b655fa6 Use -e instead of -f when checking for Keyfile
Why? Because we can use FD in place of regular files. Like this:
root@backup:~# bkctld key test <(echo "ssh-rsa AA...")
Update test : key = /dev/fd/63
2017-08-30 17:23:45 +02:00
Victor Laborie ea5362ca2a Add mount check when starting jail 2017-08-17 14:55:09 -04:00
Victor Laborie 3bd4294cfb Fix jail cleaning when not running 2017-08-17 14:53:40 -04:00
Victor Laborie 44620c363a Detect btrfs command path instead of harcoding it 2017-08-17 10:35:08 -04:00
Victor Laborie 00e1569fd6 Move /var/run to /run 2017-08-17 10:35:08 -04:00
Victor LABORIE f2146a56e5 Simplier, lighter and more secure jail 2017-07-21 16:46:37 +02:00
Victor LABORIE 4b86284ca0 Don't copy dsa host key but copy ecdsa and ed25519 if present 2017-07-21 16:46:36 +02:00
Victor LABORIE 8f2c869dfa Fix sshd logging 2017-07-21 16:46:36 +02:00
Victor LABORIE 8ac454dae0 Fix shellcheck warnings 2017-07-19 14:08:48 +02:00
Victor LABORIE b8e4c3f11b Posix compatibility
* Don't use brace expansion
* Don't use process substitution
* Don't use source keyword
* Don't use $RANDOM var
2017-07-19 13:40:16 +02:00
Victor LABORIE e82340943b Fix if [[ -> if [ 2017-07-13 16:41:38 +02:00
Victor LABORIE beecd93c2b Fix btrfs support/detection 2017-07-13 16:41:32 +02:00
Victor LABORIE cc4bee52bd Btrfs snapshot (incs) are now readonly 2017-05-17 16:46:54 +02:00
Victor LABORIE e5ac7e6e73 Delete firewall rules on bkctld remove 2017-03-31 14:54:18 +02:00
Victor LABORIE e815d61867 Use lazy umount (wait for sshd stop) 2017-03-24 12:19:19 +01:00
Victor LABORIE 7493327b1b Don't automatically purge incs with bkctld remove (cp version) 2017-03-15 11:15:55 +01:00
Victor LABORIE 031723d26a Add local dir for surcharge default templates files 2017-02-17 13:19:53 +01:00
Victor LABORIE d35c37dd6e Print all IP on bkctld status (Fix #2135) 2017-02-09 15:24:55 +01:00
Victor LABORIE 3ad28029a3 Fix bkctld sync 2017-02-02 10:43:48 +01:00
Victor LABORIE 43137dadb2 Make minifirewall silent 2017-02-01 16:31:12 +01:00
Victor LABORIE 2a6b998d9e Use absolute path for btrfs command (fix cron use) 2017-01-27 11:33:58 +01:00
Victor LABORIE 0296fab941 Fix mail notification constant name 2017-01-18 10:33:02 +01:00