Added elkarbackup CT
This commit is contained in:
16
CT-Files/elkarbackupDEB/Scripts/FirstRun.sh
Normal file
16
CT-Files/elkarbackupDEB/Scripts/FirstRun.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/bin/ash
|
||||
ThisScriptConfigured=no
|
||||
##DB
|
||||
MysqlIP=127.0.0.1
|
||||
MysqlUsername=elkarbackup
|
||||
MysqlDatabase=elkarbackup
|
||||
MysqlPassword=Password
|
||||
|
||||
#Check if script is configured
|
||||
if [ $ThisScriptConfigured = no ]; then
|
||||
echo "Script is not configured"
|
||||
exit
|
||||
fi
|
||||
|
||||
sed -i -e 's/DBServer/'$MysqlIP'/' -e 's/DBName/'$MysqlDatabase'/' -e 's/DBUser/'$MysqlUsername'/' -e 's/DBPass/'$MysqlPassword'/' -e 's/ElkarToken/'$(tr -dc 'A-Za-z0-9!#%()*+,-.:;<=>?@[]^_{|}~' 2>/dev/null </dev/urandom | head -c 20 ; echo )'/' /etc/elkarbackup/parameters.yaml
|
||||
dpkg --configure -a
|
||||
7
CT-Files/elkarbackupDEB/Scripts/Init.sh
Normal file
7
CT-Files/elkarbackupDEB/Scripts/Init.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
#Install elkarbackup
|
||||
apt install /opt/Setup/rsnapshot.deb elkarbackup -y
|
||||
echo "Apt intall being unable to configure elkarbackup is expected"
|
||||
rm /opt/Setup/rsnapshot.deb
|
||||
mv /opt/Setup/Configs/elkarbackupconf.yaml /etc/elkarbackup/parameters.yaml
|
||||
apt clean all
|
||||
Reference in New Issue
Block a user