リビジョン | 8be9aca0e278d717b391da4ab345437ce3cb2ca7 (tree) |
---|---|
日時 | 2010-06-04 18:36:04 |
作者 | Taizo ITO <taizo.ito@hde....> |
コミッター | Taizo ITO |
@@ -6,6 +6,7 @@ | ||
6 | 6 | %define _prefix /opt |
7 | 7 | |
8 | 8 | %define __python $(which python) |
9 | +%define __chkconfig /sbin/chkconfig | |
9 | 10 | %define __app pysilhouette |
10 | 11 | %define __prog silhouette |
11 | 12 | %define __progd %{__prog}d |
@@ -113,13 +114,22 @@ fi | ||
113 | 114 | if [ ! -e %{__datadir} ]; then |
114 | 115 | mkdir -p %{__datadir} 2> /dev/null |
115 | 116 | fi |
117 | +# Processing of silhouetted | |
118 | +if [ $1 = 1 ]; then | |
119 | + %{__chkconfig} --add silhouetted >/dev/null 2>&1 | |
120 | + %{__chkconfig} silhouetted on >/dev/null 2>&1 | |
121 | + %{_initrddir}/silhouetted start >/dev/null 2>&1 | |
122 | +fi | |
116 | 123 | |
117 | 124 | %postun |
118 | 125 | if [ $1 = 0 ]; then |
119 | 126 | /usr/sbin/userdel %{_user} 2> /dev/null || : |
120 | 127 | /usr/sbin/groupdel %{_group} 2> /dev/null || : |
121 | 128 | fi |
122 | - | |
129 | +if [ $1 = 0 ]; then | |
130 | + %{_initrddir}/silhouetted stop >/dev/null 2>&1 | |
131 | + %{__chkconfig} --del silhouetted >/dev/null 2>&1 | |
132 | +fi | |
123 | 133 | |
124 | 134 | %files -f INSTALLED_FILES |
125 | 135 | %defattr(-,root,root) |