mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 18:42:12 +08:00
Adding missing file--privoxy--to app privoxy
This commit is contained in:
parent
aad1d61f77
commit
6b61f0172f
55
privoxy/privoxy
Normal file
55
privoxy/privoxy
Normal file
@ -0,0 +1,55 @@
|
||||
#!/bin/bash
|
||||
|
||||
# source application-specific settings
|
||||
[ -f /etc/conf.d/privoxy ] && . /etc/conf.d/privoxy
|
||||
|
||||
. /etc/rc.conf
|
||||
. /etc/rc.d/functions
|
||||
|
||||
PID=`pidof -o %PPID /usr/sbin/privoxy`
|
||||
|
||||
start() {
|
||||
stat_busy "Starting Privoxy"
|
||||
|
||||
# create missing logfiles
|
||||
for i in logfile jarfile; do
|
||||
touch /var/log/privoxy/$i
|
||||
chgrp $PRIVOXY_GROUP /var/log/privoxy/$i
|
||||
chmod 660 /var/log/privoxy/$i
|
||||
done
|
||||
[ -z "$PID" ] && /usr/sbin/privoxy $PRIVOXY_ARGS 2>/dev/null
|
||||
if [ $? -gt 0 ]; then
|
||||
stat_fail
|
||||
else
|
||||
add_daemon privoxy
|
||||
stat_done
|
||||
fi
|
||||
}
|
||||
|
||||
stop() {
|
||||
stat_busy "Stopping Privoxy"
|
||||
[ ! -z "$PID" ] && kill $PID &> /dev/null
|
||||
if [ $? -gt 0 ]; then
|
||||
stat_fail
|
||||
else
|
||||
rm_daemon privoxy
|
||||
stat_done
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 {start|stop|restart}"
|
||||
esac
|
||||
exit 0
|
Loading…
Reference in New Issue
Block a user