etc
/
rc.d
/
rc5.d
➕ New
📤 Upload
✎ Editing:
S51kav4fs-wmconsole
← Back
#!/bin/sh ### BEGIN INIT INFO # Provides: kav4fs-wmconsole # Required-Start: $network kav4fs-supervisor # Required-Stop: $network kav4fs-supervisor # Should-Start: # Should-Stop: # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Kaspersky Web Management Console # Description: Provides a web-based administration interface to # Kaspersky Anti-Virus for Linux File Server. # Allows users to view and manage the file server protection remotely. ### END INIT INFO KL_APP=kav4fs KL_SERVICE_TITLE="Kaspersky Web Management Console" KL_SERVICE_NAME=kav4fs-wmconsole KL_SERVICE_BIN=/opt/kaspersky/kav4fs/sbin/kav4fs-wmconsoled KL_SERVICE_CONFIG=/etc/opt/kaspersky/kav4fs-wmconsole.conf KL_WMC_PASSWD_FILE=/var/opt/kaspersky/kav4fs/wmconsole/admin.passwd . /opt/kaspersky/$KL_APP/lib/rcfunctions.sh export LANG=$LOCALE export LC_ALL=$LOCALE lock_subsystem() { if [ -d /var/lock/subsys ]; then touch "/var/lock/subsys/$KL_SERVICE_NAME" fi } unlock_subsystem() { if [ -d /var/lock/subsys ]; then rm -f "/var/lock/subsys/$KL_SERVICE_NAME" fi } # Reset status of this service kl_reset kl_run_dir=/var/run/kav4fs if [ ! -e "$kl_run_dir" ] ; then mkdir "$kl_run_dir" chmod 0750 "$kl_run_dir" fi case "$1" in start) kl_action "Starting" if [ ! -f "$KL_WMC_PASSWD_FILE" ] ; then echo -n ": password file not found!" kl_setrc 6 elif $KL_SERVICE_BIN -t -f "$KL_SERVICE_CONFIG" >/dev/null 2>&1 ; then kl_start_daemon $KL_SERVICE_BIN -f "$KL_SERVICE_CONFIG" else kl_setrc 1 fi kl_status -v kl_checkproc $KL_SERVICE_BIN && lock_subsystem ;; stop) kl_action "Shutting down" kl_killproc $KL_SERVICE_BIN kl_status -v kl_checkproc $KL_SERVICE_BIN || unlock_subsystem ;; try-restart|condrestart) # Do a restart only if the service was active before. $0 status >/dev/null if test $? = 0; then $0 restart else kl_reset # Not running is not a failure. fi # Remember status and be quiet kl_status ;; restart) ## Stop the service and regardless of whether it was ## running or not, start it again. $0 stop $0 start # Remember status and be quiet kl_status ;; force-reload) ## Signal the daemon to reload its config. Most daemons do this ## on signal 1 (SIGHUP). ## If it does not support it, restart the service if it is running. ## if it supports it: kl_action "Reload service" kl_killproc $KL_SERVICE_BIN -HUP kl_status -v ## Otherwise: #$0 try-restart #kl_status ;; reload) ## Like force-reload, but if daemon does not support ## signaling, do nothing (!) # If it supports signaling: kl_action "Reload service" kl_killproc $KL_SERVICE_BIN -HUP kl_status -v ## Otherwise if it does not support reload: #if [ "$KL_OS" = 'suse' ] ; then # rc_failed 3 # kl_status -v #else # $0 restart #fi ;; status) kl_action "Checking for service" kl_checkproc $KL_SERVICE_BIN kl_status -v ;; *) echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}" exit 1 ;; esac kl_exit
💾 Save Changes
Cancel
📤 Upload File
×
Select File
Upload
Cancel
➕ Create New
×
Type
📄 File
📁 Folder
Name
Create
Cancel
✎ Rename Item
×
Current Name
New Name
Rename
Cancel
🔐 Change Permissions
×
Target File
Permission (e.g., 0755, 0644)
0755
0644
0777
Apply
Cancel