2 # Copyright 1999-2012 Gentoo Foundation
3 # Distributed under the terms of the GNU General Public License v2
5 description="Webbrowser profile syncing"
9 ebegin "Starting Profile-Sync-Daemon"
10 if [ -z "$USERS" ]; then
11 eerror "Define at least one user in /etc/conf.d/psd"
16 homedir=$(su -c 'echo $HOME' $i)
17 if [ ! -d "$homedir" ]; then
18 eerror "Invalid user defined in /etc/conf.d/psd"
23 /usr/bin/profile-sync-daemon check
24 start-stop-daemon --start --pidfile "${PIDFILE}" --make-pidfile --background \
25 --exec /usr/bin/profile-sync-daemon -- sync
30 ebegin "Stopping Profile-Sync-Daemon"
31 if [ ! -f "$PIDFILE" ]; then
32 eerror "Profile-Sync-Daemon is not running, nothing to stop!"
35 /usr/bin/profile-sync-daemon sync && /usr/bin/profile-sync-daemon unsync
42 ebegin "Syncing browser profiles in tmpfs to physical disc"
43 if [ ! -f "$PIDFILE" ]; then
44 eerror "Profile-Sync-Daemon is not running... cannot sync!"
47 /usr/bin/profile-sync-daemon sync
53 if [ ! -f "$PIDFILE" ]; then
54 eerror "Profile-Sync-Daemon is not running"
56 einfo "Profile-Sync-Daemon is running"