* updated krdc (21.12.1 -> 21.12.2), untested
[t2-trunk.git] / package / network / wicd / wicd.init
blob7690910febd3911278bd5d32dbfe608fb28aa108
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/wicd/wicd.init
3 # Copyright (C) 2009 - 2021 The T2 SDE Project
4
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
7
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License version 2.
10 # --- T2-COPYRIGHT-NOTE-END ---
12 main_begin
14     block_begin(start, `Starting wicd')
15         check(`if [ -s /var/run/wicd/wicd.pid ] ; then
16                 kill $(cat /var/run/wicd/wicd.pid)
17         fi')
18         check(`D_prefix/sbin/wicd')
19         sleep 1
20     block_end
22     block_begin(stop, `Stopping wicd')
23         check(`if [ -s /var/run/wicd/wicd.pid ] ; then
24                 kill $(cat /var/run/wicd/wicd.pid)
25         else
26                 echo "wicd is not running or /var/run/wicd/wicd.pid disappeared."
27                 error=1
28         fi')
29     block_end
31     block_begin(restart, `Restarting wicd')
32         check(`if [ -s /var/run/wicd/wicd.pid ] ; then
33                 kill -HUP $(cat /var/run/wicd/wicd.pid)
34         else
35                 echo "wicd is not running or /var/run/wicd/wicd.pid disappeared."
36                 error=1
37         fi')
38     block_end
40 main_end