postinst
资源名称:gateway-1.2.1 [点击查看]
上传用户:gzpyjq
上传日期:2013-01-31
资源大小:1852k
文件大小:1k
源码类别:
手机WAP编程
开发平台:
WINDOWS
- #!/bin/sh
- # Debian postinst script for Kannel.
- set -e
- # Automatically added by dh_installdocs
- if [ "$1" = "configure" ]; then
- if [ -d /usr/doc -a ! -e /usr/doc/aktion -a -d /usr/share/doc/aktion ]; then
- ln -sf ../share/doc/aktion /usr/doc/aktion
- fi
- fi
- # End automatically added section
- # Create a "kannel" user. This has modeled after the code in the postfix.deb
- # postinst. We first try to set the ownership of /var/log/kannel. If that
- # fails, we create the user and re-try. If that still fails, we abort.
- if chown kannel.root /var/log/kannel 2>/dev/null
- then
- :
- elif adduser --system --group kannel
- then
- chown kannel.root /var/log/kannel
- fi
- # Update rc.d links.
- update-rc.d kannel defaults >/dev/null
- # Start Kannel.
- # XXX we *should* check that which run-level we're in and only start
- # Kannel if /etc/rcX.d/S??kannel exists. I don't know how to figure out
- # the current run-level, though.
- /etc/init.d/kannel restart || true