2 # Copyright 1999-2012 Gentoo Foundation
3 # Distributed under the terms of the GNU General Public License v2
5 description="Webbrowser profile syncing"
7 PIDFILE=/var/run/${SVCNAME}.pid
9 [ -e /etc/psd.conf ] && . /etc/psd.conf
12 ebegin "Starting Profile-Sync-Daemon"
13 if [[ -z $USERS ]]; then
14 eerror "Define at least one user in /etc/psd.conf"
19 if [[ ! -d /home/$i ]]; then
20 eerror "Invalid user defined in /etc/psd.conf"
25 /usr/bin/profile-sync-daemon check
26 start-stop-daemon --start --pidfile ${PIDFILE} --make-pidfile --background \
27 --exec /usr/bin/profile-sync-daemon -- sync
32 ebegin "Stopping Profile-Sync-Daemon"
33 if [[ ! -f $PIDFILE ]]; then
34 eerror "Profile-Sync-Daemon is not running, nothing to stop!"
37 /usr/bin/profile-sync-daemon unsync
44 ebegin "Syncing browser profiles in tmpfs to physical disc"
45 if [[ ! -f $PIDFILE ]]; then
46 eerror "Profile-Sync-Daemon is not running... cannot sync!"
49 /usr/bin/profile-sync-daemon sync