-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.sh
executable file
·47 lines (40 loc) · 1.33 KB
/
setup.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
#!/bin/bash
# This file is part of spsbackup.
#
# spsbackup is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# spsbackup is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with pi-stomp. If not, see <https://www.gnu.org/licenses/>.
#install default configuration file in /etc
echo "Installing configuration file in /etc"
sudo cp spsbackup.conf /etc/
if [ -f /etc/spsbackup.conf ]; then
echo "...Done!"
else
echo "Something went wrong!"
fi
backup_location=$HOME/backup
echo "Creating backup location in $backup_location"
if [ ! -d $backup_location ]; then
sudo mkdir $backup_location
echo "...Done!"
else
echo "$backup_location already exists!"
fi
echo "Installing default list file in $backup_location"
sudo cp spsbackup.list $backup_location/
if [ -f $backup_location/spsbackup.list ]; then
echo "...Done!"
else
echo "Something went wrong!"
fi
sudo chmod 777 $backup_location/spsbackup.list
echo "All done!"