mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] readd yunohost-firewall init script
This commit is contained in:
parent
6456bb8b61
commit
9803e1eefa
1 changed files with 52 additions and 0 deletions
52
debian/moulinette-yunohost.yunohost-firewall.init
vendored
Executable file
52
debian/moulinette-yunohost.yunohost-firewall.init
vendored
Executable file
|
@ -0,0 +1,52 @@
|
|||
#! /bin/bash
|
||||
### BEGIN INIT INFO
|
||||
# Provides: yunohost-firewall
|
||||
# Required-Start: $local_fs $remote_fs $network $syslog
|
||||
# Required-Stop: $local_fs $remote_fs $network $syslog
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: Start/stop YunoHost firewall
|
||||
### END INIT INFO
|
||||
|
||||
DAEMON=/usr/bin/yunohost
|
||||
DAEMON_OPTS=""
|
||||
|
||||
test -x $DAEMON || exit 0
|
||||
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
logger "YunoHost firewall: Start script executed"
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
logger "YunoHost firewall: Starting"
|
||||
log_daemon_msg "Starting firewall: YunoHost"
|
||||
/usr/bin/yunohost firewall reload
|
||||
log_end_msg $?
|
||||
;;
|
||||
stop)
|
||||
logger "YunoHost firewall: Stopping"
|
||||
log_daemon_msg "Stopping firewall: YunoHost"
|
||||
/usr/bin/yunohost firewall stop
|
||||
log_end_msg $?
|
||||
;;
|
||||
restart)
|
||||
logger "YunoHost firewall: Restarting"
|
||||
log_daemon_msg "Restarting firewall: YunoHost"
|
||||
/usr/bin/yunohost firewall reload
|
||||
log_end_msg $?
|
||||
;;
|
||||
status)
|
||||
logger "YunoHost API: Running"
|
||||
log_daemon_msg "YunoHost API: Running"
|
||||
iptables -L | grep "Chain INPUT (policy DROP)" > /dev/null 2>&1
|
||||
log_end_msg $?
|
||||
;;
|
||||
*)
|
||||
logger "YunoHost API: Invalid usage"
|
||||
echo "Usage: /etc/init.d/yunohost-api {start|stop|restart|status}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
Loading…
Add table
Reference in a new issue