Skip to content

Instantly share code, notes, and snippets.

@hasufell

hasufell/psd Secret

Last active December 20, 2015 00:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hasufell/66ef7d64297c8725eb09 to your computer and use it in GitHub Desktop.
Save hasufell/66ef7d64297c8725eb09 to your computer and use it in GitHub Desktop.
#!/sbin/runscript
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
description="Webbrowser profile syncing"
extra_commands="resync"
description_resync="Manually sync the disk profile with running tmpfs image"
PSDCONF="/etc/conf.d/psd"
export PSDCONF
DAEMON_FILE=/var/run/psd.pid
export DAEMON_FILE
depend() {
need devfs localmount
}
start() {
ebegin "Starting Profile-Sync-Daemon"
if [ -z "$USERS" ]; then
eerror "Define at least one user in /etc/conf.d/psd"
return 1
fi
/usr/bin/profile-sync-daemon sync
eend $?
}
stop() {
ebegin "Stopping Profile-Sync-Daemon"
/usr/bin/profile-sync-daemon unsync
eend $?
}
status() {
/usr/bin/profile-sync-daemon debug
}
resync() {
ebegin "Syncing browser profiles in tmpfs to physical disc"
/usr/bin/profile-sync-daemon resync
eend $?
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment