Revision 24366,
749 bytes
checked in by geofft, 15 years ago
(diff) |
In cupsys-config:
* Refactor the CUPS-restarting logic into a separate shell script so that
other postinsts can share code with it.
|
-
Property svn:executable set to
*
|
Line | |
---|
1 | restart_cups() |
---|
2 | { |
---|
3 | # Handle Debian package name change from cupsys to cups. |
---|
4 | [ -e /etc/init.d/cups ] && rcname=cups || rcname=cupsys |
---|
5 | # Restart cupsd if it is running |
---|
6 | if /etc/init.d/$rcname status; then |
---|
7 | if hash invoke-rc.d; then |
---|
8 | invoke="invoke-rc.d $rcname" |
---|
9 | else |
---|
10 | invoke="/etc/init.d/$rcname" |
---|
11 | fi |
---|
12 | # Flush remote.cache to deal with things like changing the |
---|
13 | # server we BrowsePoll against. But don't do so if |
---|
14 | # policy-rc.d is going to prevent us from restarting cupsd |
---|
15 | # (for instance, if reactivate is installed and running; |
---|
16 | # in that case, the next logout will flush remote.cache and restart |
---|
17 | # cupsd anyway). |
---|
18 | if $invoke stop; then |
---|
19 | rm -f /var/cache/cups/remote.cache |
---|
20 | $invoke start |
---|
21 | fi |
---|
22 | fi |
---|
23 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.