Mercurial > feed-push
comparison setup @ 27:75563016f269 draft
add systemd .service unit
Signed-off-by: Changaco <changaco ατ changaco δοτ net>
author | Changaco <changaco ατ changaco δοτ net> |
---|---|
date | Sat, 04 Aug 2012 18:33:17 +0200 |
parents | 70bf588021fa |
children |
comparison
equal
deleted
inserted
replaced
26:ee5a5a7a9f72 | 27:75563016f269 |
---|---|
25 confdir="${DESTDIR}etc/$progname" | 25 confdir="${DESTDIR}etc/$progname" |
26 | 26 |
27 if [ "$action" == install ]; then | 27 if [ "$action" == install ]; then |
28 install -v -m 755 -D $progname "$_PREFIX/bin/$progname" | 28 install -v -m 755 -D $progname "$_PREFIX/bin/$progname" |
29 install_dir examples "$_PREFIX/share/$progname" | 29 install_dir examples "$_PREFIX/share/$progname" |
30 [ -d /etc/rc.d ] && install_dir rc.d "${DESTDIR}etc" && install -vd "$confdir" | 30 install -vd "$confdir" |
31 install -v -m 755 -D init/$progname.bash "${DESTDIR}etc/rc.d/$progname" | |
32 install -v -m 644 -D init/$progname.service "${DESTDIR}usr/lib/systemd/system/$progname.service" | |
31 elif [ "$action" == uninstall ]; then | 33 elif [ "$action" == uninstall ]; then |
32 remove "$_PREFIX/bin/$progname" | 34 remove "$_PREFIX/bin/$progname" |
33 remove "$_PREFIX/share/$progname/examples" | 35 remove "$_PREFIX/share/$progname/examples" |
34 remove "${DESTDIR}etc/rc.d/$progname" | 36 remove "${DESTDIR}etc/rc.d/$progname" |
35 if [ $(ls -a "$confdir" | wc -l) -eq 2 ]; then rmdir "$confdir" | 37 if [ $(ls -a "$confdir" | wc -l) -eq 2 ]; then rmdir "$confdir" |