save point
This commit is contained in:
parent
bacf64dc22
commit
8356cbd2fc
2 changed files with 37 additions and 1 deletions
|
@ -50,8 +50,12 @@ function copy_config() {
|
||||||
echo $arcdir
|
echo $arcdir
|
||||||
mkslf=$(which makeself.sh)
|
mkslf=$(which makeself.sh)
|
||||||
echo $mkslf
|
echo $mkslf
|
||||||
$mkslf --gzip $tmpdir $arcdir/restore.run "SFX archive for backup" echo "Extraction done"
|
cp ./restore.bash $tmpdir
|
||||||
|
$mkslf --gzip $tmpdir $arcdir/restore.run "SFX archive for restoration" ./restore.bash
|
||||||
|
cp $arcdir/restore.run ./
|
||||||
|
chown kake26:kake26 restore.run
|
||||||
cprint 2 "Done!"
|
cprint 2 "Done!"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function menu_option_two() {
|
function menu_option_two() {
|
||||||
|
|
32
restore.bash
Normal file → Executable file
32
restore.bash
Normal file → Executable file
|
@ -22,3 +22,35 @@ function press_enter() {
|
||||||
clear
|
clear
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function restore_config() {
|
||||||
|
cprint 2 "Restoring config files..."
|
||||||
|
sleep 1
|
||||||
|
|
||||||
|
cprint 2 "Done!"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Check for root only important on pure Debian as there is no sudo by default
|
||||||
|
if [ "$(id -u)" != "0" ]; then
|
||||||
|
# check is the system is debian
|
||||||
|
if [ -f /etc/debian_version ]; then
|
||||||
|
cprint 3 "Notice: This script may need to be run as root on Debian, especially if its a stock install. Also requires makeself to created a distributable self restorable package" ; press_enter ;
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
until [ "$selection" = "0" ]; do
|
||||||
|
clear
|
||||||
|
echo ""
|
||||||
|
cprint 3 " Main Menu"
|
||||||
|
mprint 1 "Restore"
|
||||||
|
mprint 0 "Exit"
|
||||||
|
echo ""
|
||||||
|
echo -n " Enter selection: "
|
||||||
|
read selection
|
||||||
|
echo ""
|
||||||
|
case $selection in
|
||||||
|
1 ) clear ; restore_config ; press_enter ;;
|
||||||
|
2 ) clear ; menu_option_two ; press_enter ;;
|
||||||
|
0 ) clear ; exit ;;
|
||||||
|
* ) clear ; incorrect_selection ; press_enter ;;
|
||||||
|
esac
|
||||||
|
done
|
Loading…
Add table
Add a link
Reference in a new issue