Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

more verbose help for user users

  • Loading branch information...
commit c8df0e1fce1e74710d476117cc3f1fa07650174a 1 parent c2b53c7
@graysky2 authored
View
5 CHANGELOG
@@ -1,3 +1,8 @@
+v5.24
+19-Feb-2013
+More verbose help for new users.
+Changed yellow color to blue for users of light colored terminals.
+
v5.23
17-Feb-2013
Fixed debian scriptlets.
View
60 INSTALL
@@ -1,36 +1,46 @@
-* Makefile.archlinux is setup for Archlinux.
-* Makefile.gentoo is setup for Gentoo.
-* Makefile.ubuntu is setup for Debian/Ubuntu.
-* Makefile.fedora18 is setup for Fedora 18 and is identical
- to the Arch Linux Makefile.
+BUILDING
+ There is no configure script nor is there anything to compile.
+ Copy or symlink the Makefile.x of your chosing to Makefile.
-There is no configure script nor is there anything to compile.
-Copy or symlink the Makefile.x of your chosing to Makefile.
+ $ ln -s Makefile.archlinux Makefile
- $ ln -s Makefile.archlinux Makefile
+ * Makefile.archlinux is setup for Archlinux.
+ * Makefile.gentoo is setup for Gentoo.
+ * Makefile.ubuntu is setup for Debian/Ubuntu.
+ * Makefile.fedora18 is setup for Fedora 18.
-Setup the via a make.
+ Setup the via a make.
- $ make
+ $ make
-Running a `make install` as root will distribute the files to
-the filesystem.
+ Running a `make install` as root will distribute the files to
+ the filesystem.
- # make install
+ # make install
-It is highly discouraged to manually build this on Arch Linux.
-Instead, use the PKGBUILD in the AUR so the resulting package
-can be managed by pacman:
-https://aur.archlinux.org/packages/profile-sync-daemon
+USE A DISTRO PROVIDED PACKAGE
+ ARCH LINUX
+ Arch Linux users may, use the PKGBUILD in the AUR at this url:
+ https://aur.archlinux.org/packages/profile-sync-daemon
-Ubuntu/Debian users may use the PPA graysky maintains at this url:
-https://launchpad.net/~graysky/+archive/utils
-Or build themselves using the included Makefile.ubuntu and debian
-build tools such as dh_make and dpkg-buildpackage. Note in this
-case the scripts in common/debian. Of particular interest is
-the fact that Ubuntu/Debian use different paths for both their
-lock files and for their default mounted tmpfs paths. See
-common/debian/postinst for the changes.
+ GENTOO
+ Gentoo users can build the package directly with the provided
+ ebuild:
+ http://packages.gentoo.org/package/www-misc/profile-sync-daemon
+
+ FEDORA
+ Fedora 18 users may use prepackaged rpms maintained by graysky
+ at the following url: http://repo-ck.com/fedora_rpms
+
+ UBUNTU/DEBIAN
+ Ubuntu/Debian users may use the PPA graysky maintains at this url:
+ https://launchpad.net/~graysky/+archive/utils
+ Or build themselves using the included Makefile.ubuntu and debian
+ build tools such as dh_make and dpkg-buildpackage. Note in this
+ case the scripts in common/debian. Of particular interest is
+ the fact that Ubuntu/Debian use different paths for both their
+ lock files and for their default mounted tmpfs paths. See
+ common/debian/postinst for the changes.
If you wish to contribute to other distros, fork this project
on github and submit a pull request:
View
2  Makefile.archlinux
@@ -1,4 +1,4 @@
-VERSION = 5.23
+VERSION = 5.24
PN = profile-sync-daemon
PREFIX ?= /usr
View
2  Makefile.fedora18
@@ -1,4 +1,4 @@
-VERSION = 5.23
+VERSION = 5.24
PN = profile-sync-daemon
PREFIX ?= /usr
View
2  Makefile.gentoo
@@ -1,4 +1,4 @@
-VERSION = 5.23
+VERSION = 5.24
PN = profile-sync-daemon
PREFIX ?= /usr
View
2  Makefile.ubuntu
@@ -1,4 +1,4 @@
-VERSION = 5.23
+VERSION = 5.24
PN = profile-sync-daemon
DESTDIR =
View
35 common/profile-sync-daemon 100644 → 100755
@@ -1,20 +1,20 @@
#!/bin/bash
# By graysky <graysky AT archlinux DOT us>
-# Inspired by some code originally written by Colin Verot
-export BLD="\e[01m" RED="\e[01;31m" GRN="\e[01;32m" YLW="\e[01;33m" NRM="\e[00m"
+# Inspired by some code originally written by Colin Verot
+export BLD="\e[01m" RED="\e[01;31m" GRN="\e[01;32m" BLU="\e[01;34m" NRM="\e[00m"
VERS="@VERSION@"
PSDCONF=${PSDCONF:-"/etc/psd.conf"}
if [[ ! -f $PSDCONF ]]; then
- echo "Cannot find $PSDCONF so bailing. Reinstall package to use Profile-sync-daemon." # nothing to do if there is no conf file
+ echo -e " Cannot find $PSDCONF so bailing. Reinstall package to use Profile-sync-daemon." # nothing to do if there is no conf file
exit 1
else
. $PSDCONF
fi
if [[ -z "$USERS" ]]; then
- echo "Must define at least one user in $PSDCONF" # nothing to do if there are no users
+ echo -e " ${BLD}Must define at least one user in ${NRM}${BLU}$PSDCONF"${NRM} # nothing to do if there are no users
exit 1
fi
@@ -36,7 +36,7 @@ root_check() {
# running as unprivileged user will fuck up the sync process resulting in unhappy users
if [[ $EUID -ne 0 ]]; then
- echo "This function must be called as root!" 1>&2
+ echo -e " ${BLD}This function must be called as root!"${NRM} 1>&2
exit 1
fi
}
@@ -170,7 +170,7 @@ dup_check() {
else
echo -e " ${RED}Error: ${NRM}${BLD}dup profile for ${GRN}$browser${NRM}${BLD} detected. See psd manpage, correct, and try again."${NRM}
[[ "$browser" = "heftig-aurora" ]] && browser="${browser##*-}" # clip of the 'heftig-' to give correct path
- echo -e " ${BLD}Must have unique last directories in ${YLW}$homedir/.mozilla/$browser/profiles.ini${NRM}${BLD} to use psd."${NRM}
+ echo -e " ${BLD}Must have unique last directories in ${BLU}$homedir/.mozilla/$browser/profiles.ini${NRM}${BLD} to use psd."${NRM}
exit 1
fi
fi
@@ -204,7 +204,7 @@ kill_browsers() {
parse_conf_file() {
echo -e "${RED}Profile-sync-daemon v$VERS${NRM}"
echo
- echo -e "${BLD}Psd will manage the following per ${YLW}${PSDCONF}${NRM}${BLD} settings:"${NRM}
+ echo -e "${BLD}Psd will manage the following per ${BLU}${PSDCONF}${NRM}${BLD} settings:"${NRM}
echo
local browser user
for user in $USERS; do
@@ -220,7 +220,7 @@ parse_conf_file() {
echo -en " ${BLD}owner/group:"
echo -e "$(tput cr)$(tput cuf 17) $user/$group"${NRM}
echo -en " ${BLD}sync target:"
- echo -e "$(tput cr)$(tput cuf 17) ${YLW}$DIR"${NRM}
+ echo -e "$(tput cr)$(tput cuf 17) ${BLU}$DIR"${NRM}
echo -en " ${BLD}tmpfs dir:"
echo -e "$(tput cr)$(tput cuf 17) ${RED}$VOLATILE/$user-$browser$suffix"${NRM}
echo -en " ${BLD}profile size:"
@@ -344,9 +344,26 @@ case "$1" in
echo
echo -e " ${BLD}$0 ${NRM}${GRN}{parse|sync|unsync}${NRM}"
echo
- echo -e " ${BLD}parse) ${NRM}${GRN}Parse${NRM}${BLD} config file (${NRM}${YLW}${PSDCONF}${NRM}${BLD}) to see which profiles will be managed."${NRM}
+ echo -e " ${BLD}parse) ${NRM}${GRN}Parse${NRM}${BLD} config file (${NRM}${BLU}${PSDCONF}${NRM}${BLD}) to see which profiles will be managed."${NRM}
echo -e " ${BLD}sync) Force a manual ${NRM}${GRN}sync${NRM}${BLD}. Must be run as root user and NOT recommended."${NRM}
echo -e " ${BLD}unsync) Force a manual ${NRM}${GRN}unsync${NRM}${BLD}. Must be run as root user and NOT recommended."${NRM}
+ echo
+ echo -e " ${BLD}It is HIGHLY discouraged to directly call $0 to sync or to unsync."${NRM}
+ if [[ -f /usr/lib/systemd/system/psd.service ]]; then
+ echo -e " ${BLD}Instead, use systemd to start/stop profile-sync-daemon."${NRM}
+ echo
+ echo -e " ${BLD}systemctl ${NRM}${GRN}[option]${NRM}${BLD} psd.service"${NRM}
+ echo -e " ${BLD} ${NRM}${GRN}start${NRM}${BLD} Turn on daemon; make symlinks and actively manage targets in tmpfs."${NRM}
+ echo -e " ${BLD} ${NRM}${GRN}stop${NRM}${BLD} Turn off daemon; remove symlinks and rotate tmpfs data back to disc."${NRM}
+ echo -e " ${BLD} ${NRM}${GRN}enable${NRM}${BLD} Autostart daemon when system comes up."${NRM}
+ echo -e " ${BLD} ${NRM}${GRN}disable${NRM}${BLD} Remove daemon from the list of autostart daemons."${NRM}
+ elif [[ -f /etc/init.d/psd ]]; then
+ echo -e " ${BLD}Instead, use the init system to start/stop profile-sync-daemon."${NRM}
+ echo
+ echo -e " ${BLD}sudo service psd ${NRM}${GRN}[option]${NRM}${BLD} or /etc/init.d/psd ${NRM}${GRN}[option]"${NRM}
+ echo -e " ${BLD} ${NRM}${GRN}start${NRM}${BLD} Turn on daemon; make symlinks and actively manage targets in tmpfs."${NRM}
+ echo -e " ${BLD} ${NRM}${GRN}stop${NRM}${BLD} Turn off daemon; remove symlinks and rotate tmpfs data back to disc."${NRM}
+ fi
;;
esac
exit 0
Please sign in to comment.
Something went wrong with that request. Please try again.