-
Notifications
You must be signed in to change notification settings - Fork 7
/
__conf2git.sh
executable file
·52 lines (47 loc) · 1.13 KB
/
__conf2git.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
# Archives files for the thecus-n5200 repository.
# --------------------------------
# cyruz - http://ciroprincipe.info
# root check
[[ $(id -u) -ne 0 ]] && { echo "Please run this script as root!"; exit 1; }
# rsync check
type rsync > /dev/null 2>&1 || { echo >&2 "Error: rsync not installed. Aborting."; exit 1; }
USR="cyrus"
HOMEDIR="/home/$USR"
SOURCEFILES="
/etc/apt/sources.list
/etc/aria2/aria2.conf
/etc/crontab
/etc/default/mathopd
/etc/default/smartmontools
/etc/default/syncthing
/etc/default/transmission-daemon
/etc/fstab
/etc/init.d/aria2
/etc/init.d/transmission-daemon
/etc/init.d/syncthing
/etc/lilo.conf
/etc/logrotate.d/freedns-updater
/etc/logrotate.d/nas_*
/etc/mailname
/etc/mathopd.conf
/etc/minidlna.conf
/etc/network/interfaces
/etc/nullmailer/
/etc/nut/
/etc/proftpd/proftpd.conf
/etc/rsyslog.d/smartd.conf
/etc/samba/smb.conf
/etc/smartd.conf
/etc/snapraid.conf
/etc/sudoers
/etc/transmission/settings.json
/etc/udev/rules.d/10-powerwalker.rules
/opt/bin/
/opt/build/common/
/opt/build/update-*
/opt/thecus/
"
DESTDIR="$HOMEDIR/thecus-n5200/"
rsync -RLav --delete $SOURCEFILES $DESTDIR
chown -R $USR:$USR $DESTDIR