1
0
mirror of https://github.com/deajan/obackup.git synced 2024-11-12 19:03:42 +01:00

osync specific changes, no impact on obackup

This commit is contained in:
deajan 2016-05-25 19:54:47 +02:00
parent ba9455d7e9
commit 1aaf80eff7

View File

@ -61,13 +61,13 @@ fi
if [ -f /sbin/init ]; then
if file /sbin/init | grep systemd > /dev/null; then
init=systemd
init="systemd"
else
init=init
init="initV"
fi
else
echo "Can't detect init system."
exit 1
echo "Can't detect initV or systemd. Service files won't be installed. You can still run $PROGRAM manually or via cron."
init=none
fi
if [ ! -d "$CONF_DIR" ]; then
@ -129,6 +129,7 @@ if [ -f "./ssh_filter.sh" ]; then
fi
fi
# OSYNC SPECIFIC
if ([ "$init" == "systemd" ] && [ -f "./$OSYNC_SERVICE_FILE_SYSTEMD_SYSTEM" ]); then
cp "./$OSYNC_SERVICE_FILE_SYSTEMD_SYSTEM" "$SERVICE_DIR_SYSTEMD_SYSTEM" && cp "./$OSYNC_SERVICE_FILE_SYSTEMD_USER" "$SERVICE_DIR_SYSTEMD_USER/$SERVICE_FILE_SYSTEMD_SYSTEM"
@ -140,7 +141,7 @@ if ([ "$init" == "systemd" ] && [ -f "./$OSYNC_SERVICE_FILE_SYSTEMD_SYSTEM" ]);
echo "Can be enabled on boot with [systemctl enable osync-srv@instance.conf]."
echo "In userland, active with [systemctl --user start osync-srv@instance.conf]."
fi
elif [ -f "./$OSYNC_SERVICE_FILE_INIT" ]; then
elif ( "$init" == "initV" ] && [ -f "./$OSYNC_SERVICE_FILE_INIT" ]); then
cp "./$OSYNC_SERVICE_FILE_INIT" "$SERVICE_DIR_INIT"
if [ $? != 0 ]; then
echo "Cannot copy osync-srv to [$SERVICE_DIR_INIT]."
@ -162,7 +163,7 @@ if ([ "$init" == "systemd" ] && [ -f "./$PMOCR_SERVICE_FILE_SYSTEMD_SYSTEM" ]);
echo "Can be activated with [systemctl start pmocr-srv] after configuring file options in [$BIN_DIR/$PROGRAM]."
echo "Can be enabled on boot with [systemctl enable pmocr-srv]."
fi
elif [ -f "./$PMOCR_SERVICE_FILE_INIT" ]; then
elif ([ "$init" == "initV" ] && [ -f "./$PMOCR_SERVICE_FILE_INIT" ]); then
cp "./$PMOCR_SERVICE_FILE_INIT" "$SERVICE_DIR_INIT"
if [ $? != 0 ]; then
echo "Cannot copy pmoct-srv to [$SERVICE_DIR_INIT]."