boxbackup

This commit is contained in:
Dr-Bean
2017-02-01 21:32:20 +01:00
parent 5a74811835
commit 38fea6c1cd
3 changed files with 32 additions and 4 deletions

View File

@ -0,0 +1,31 @@
{
"defaults":{
"run-as": "package"
},
"username": "sc-boxbackup-client",
"ctrl-script": [{
"action": "preinst",
"run-as": "root"
}, {
"action": "postinst",
"run-as": "root"
}, {
"action": "preuninst",
"run-as": "root"
}, {
"action": "postuninst",
"run-as": "root"
}, {
"action": "preupgrade",
"run-as": "root"
}, {
"action": "postupgrade",
"run-as": "root"
}, {
"action": "start",
"run-as": "root"
}, {
"action": "stop",
"run-as": "root"
}]
}

View File

@ -16,7 +16,7 @@ PID_FILE="${INSTALL_DIR}/var/run/bbackupd.pid"
start_daemon ()
{
if [ -f ${CFG_FILE} ]; then
su - ${USER} -c "${BBACKUPD} -c ${CFG_FILE}"
su ${USER} -s /bin/sh -c "${BBACKUPD} -c ${CFG_FILE}"
else
echo "Use /usr/local/boxbackup-client/sbin/syno-bbackupd-config to configure Box Backup Client" >&2
fi

View File

@ -20,9 +20,6 @@ postinst ()
# Link
ln -s ${SYNOPKG_PKGDEST} ${INSTALL_DIR}
# Correct the files ownership
chown -R ${USER}:root ${SYNOPKG_PKGDEST}
# Configuration message
echo "You need to manually configure Box Backup Client before running the package. To do so, connect to SSH and use /usr/local/boxbackup-client/sbin/syno-bbackupd-config"