Linux webserver 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64
Apache/2.4.52 (Ubuntu)
Server IP : 192.168.1.1 & Your IP : 3.134.92.193
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
snap /
core20 /
2501 /
usr /
sbin /
Delete
Unzip
Name
Size
Permission
Date
Action
aa-remove-unknown
3
KB
-rwxr-xr-x
2024-03-06 18:40
aa-status
8.63
KB
-rwxr-xr-x
2024-03-06 18:40
aa-teardown
139
B
-rwxr-xr-x
2019-06-17 23:55
add-shell
860
B
-rwxr-xr-x
2019-12-07 02:13
addgroup
36.9
KB
-rwxr-xr-x
2020-04-16 14:12
adduser
36.9
KB
-rwxr-xr-x
2020-04-16 14:12
agetty
67.38
KB
-rwxr-xr-x
2024-04-09 15:34
apparmor_parser
1.46
MB
-rwxr-xr-x
2024-03-06 18:40
apparmor_status
8.63
KB
-rwxr-xr-x
2024-03-06 18:40
arpd
78.27
KB
-rwxr-xr-x
2020-02-13 17:21
arptables
215.32
KB
-rwxr-xr-x
2023-05-09 18:39
arptables-nft
215.32
KB
-rwxr-xr-x
2023-05-09 18:39
arptables-nft-restore
215.32
KB
-rwxr-xr-x
2023-05-09 18:39
arptables-nft-save
215.32
KB
-rwxr-xr-x
2023-05-09 18:39
arptables-restore
215.32
KB
-rwxr-xr-x
2023-05-09 18:39
arptables-save
215.32
KB
-rwxr-xr-x
2023-05-09 18:39
badblocks
34.32
KB
-rwxr-xr-x
2023-10-09 01:56
blkdeactivate
14.49
KB
-rwxr-xr-x
2020-02-13 21:21
blkdiscard
34.23
KB
-rwxr-xr-x
2024-04-09 15:34
blkid
118.26
KB
-rwxr-xr-x
2024-04-09 15:34
blkzone
70.23
KB
-rwxr-xr-x
2024-04-09 15:34
blockdev
66.23
KB
-rwxr-xr-x
2024-04-09 15:34
bridge
102.3
KB
-rwxr-xr-x
2020-02-13 17:21
capsh
30.3
KB
-rwxr-xr-x
2023-06-07 13:02
cfdisk
102.59
KB
-rwxr-xr-x
2024-04-09 15:34
chcpu
46.23
KB
-rwxr-xr-x
2024-04-09 15:34
chgpasswd
66.2
KB
-rwxr-xr-x
2024-02-06 12:49
chmem
62.23
KB
-rwxr-xr-x
2024-04-09 15:34
chpasswd
58.2
KB
-rwxr-xr-x
2024-02-06 12:49
chroot
42.34
KB
-rwxr-xr-x
2019-09-05 10:38
cpgr
60.34
KB
-rwxr-xr-x
2024-02-06 12:49
cppw
60.34
KB
-rwxr-xr-x
2024-02-06 12:49
cryptdisks_start
1.51
KB
-rwxr-xr-x
2020-02-04 13:11
cryptdisks_stop
844
B
-rwxr-xr-x
2020-02-04 13:11
cryptsetup
135.54
KB
-rwxr-xr-x
2022-01-18 17:36
cryptsetup-reencrypt
105.32
KB
-rwxr-xr-x
2022-01-18 17:36
ctrlaltdel
38.23
KB
-rwxr-xr-x
2024-04-09 15:34
debugfs
225.8
KB
-rwxr-xr-x
2023-10-09 01:56
delgroup
16.11
KB
-rwxr-xr-x
2020-04-16 14:12
deluser
16.11
KB
-rwxr-xr-x
2020-04-16 14:12
depmod
166.36
KB
-rwxr-xr-x
2021-08-17 09:19
devlink
150.47
KB
-rwxr-xr-x
2020-02-13 17:21
dhclient
508.98
KB
-rwxr-xr-x
2023-01-31 22:10
dhclient-script
15.92
KB
-rwxr-xr-x
2023-01-31 22:10
dmsetup
171.02
KB
-rwxr-xr-x
2020-02-13 21:21
dmstats
171.02
KB
-rwxr-xr-x
2020-02-13 21:21
dosfsck
58.08
KB
-rwxr-xr-x
2018-05-12 22:59
dosfslabel
54.08
KB
-rwxr-xr-x
2018-05-12 22:59
dumpe2fs
30.38
KB
-rwxr-xr-x
2023-10-09 01:56
e2freefrag
18.38
KB
-rwxr-xr-x
2023-10-09 01:56
e2fsck
327.21
KB
-rwxr-xr-x
2023-10-09 01:56
e2image
42.38
KB
-rwxr-xr-x
2023-10-09 01:56
e2label
106.55
KB
-rwxr-xr-x
2023-10-09 01:56
e2mmpstatus
30.38
KB
-rwxr-xr-x
2023-10-09 01:56
e2scrub
7.13
KB
-rwxr-xr-x
2023-10-09 01:56
e2scrub_all
5.27
KB
-rwxr-xr-x
2023-10-09 01:56
e2undo
22.38
KB
-rwxr-xr-x
2023-10-09 01:56
e4crypt
30.38
KB
-rwxr-xr-x
2023-10-09 01:56
e4defrag
34.3
KB
-rwxr-xr-x
2023-10-09 01:56
ebtables
215.32
KB
-rwxr-xr-x
2023-05-09 18:39
ebtables-nft
215.32
KB
-rwxr-xr-x
2023-05-09 18:39
ebtables-nft-restore
215.32
KB
-rwxr-xr-x
2023-05-09 18:39
ebtables-nft-save
215.32
KB
-rwxr-xr-x
2023-05-09 18:39
ebtables-restore
215.32
KB
-rwxr-xr-x
2023-05-09 18:39
ebtables-save
215.32
KB
-rwxr-xr-x
2023-05-09 18:39
faillock
14.15
KB
-rwxr-xr-x
2024-01-10 13:55
fatlabel
54.08
KB
-rwxr-xr-x
2018-05-12 22:59
fdformat
34.23
KB
-rwxr-xr-x
2024-04-09 15:34
fdisk
150.27
KB
-rwxr-xr-x
2024-04-09 15:34
filefrag
18.33
KB
-rwxr-xr-x
2023-10-09 01:56
findfs
14.23
KB
-rwxr-xr-x
2024-04-09 15:34
fsck
54.27
KB
-rwxr-xr-x
2024-04-09 15:34
fsck.cramfs
38.26
KB
-rwxr-xr-x
2024-04-09 15:34
fsck.ext2
327.21
KB
-rwxr-xr-x
2023-10-09 01:56
fsck.ext3
327.21
KB
-rwxr-xr-x
2023-10-09 01:56
fsck.ext4
327.21
KB
-rwxr-xr-x
2023-10-09 01:56
fsck.fat
58.08
KB
-rwxr-xr-x
2018-05-12 22:59
fsck.minix
122.25
KB
-rwxr-xr-x
2024-04-09 15:34
fsck.msdos
58.08
KB
-rwxr-xr-x
2018-05-12 22:59
fsck.vfat
58.08
KB
-rwxr-xr-x
2018-05-12 22:59
fsfreeze
14.23
KB
-rwxr-xr-x
2024-04-09 15:34
fstab-decode
14.3
KB
-rwxr-xr-x
2020-02-13 18:38
fstrim
70.23
KB
-rwxr-xr-x
2024-04-09 15:34
genl
82.29
KB
-rwxr-xr-x
2020-02-13 17:21
getcap
14.3
KB
-rwxr-xr-x
2023-06-07 13:02
getpcaps
14.3
KB
-rwxr-xr-x
2023-06-07 13:02
getty
67.38
KB
-rwxr-xr-x
2024-04-09 15:34
groupadd
90.95
KB
-rwxr-xr-x
2024-02-06 12:49
groupdel
86.77
KB
-rwxr-xr-x
2024-02-06 12:49
groupmems
62.24
KB
-rwxr-xr-x
2024-02-06 12:49
groupmod
94.86
KB
-rwxr-xr-x
2024-02-06 12:49
grpck
62.18
KB
-rwxr-xr-x
2024-02-06 12:49
grpconv
58.05
KB
-rwxr-xr-x
2024-02-06 12:49
grpunconv
58.05
KB
-rwxr-xr-x
2024-02-06 12:49
halt
1.06
MB
-rwxr-xr-x
2023-11-21 20:57
hwclock
102.35
KB
-rwxr-xr-x
2024-04-09 15:34
iconvconfig
30.4
KB
-rwxr-xr-x
2025-01-29 14:41
init
1.76
MB
-rwxr-xr-x
2023-11-21 20:57
insmod
166.36
KB
-rwxr-xr-x
2021-08-17 09:19
installkernel
2.58
KB
-rwxr-xr-x
2019-12-07 02:13
integritysetup
60.23
KB
-rwxr-xr-x
2022-01-18 17:36
invoke-rc.d
16.64
KB
-rwxr-xr-x
2019-06-21 18:56
ip
702.05
KB
-rwxr-xr-x
2022-03-24 11:56
ip6tables
96.97
KB
-rwxr-xr-x
2023-05-09 18:39
ip6tables-apply
6.89
KB
-rwxr-xr-x
2023-05-09 18:39
ip6tables-legacy
96.97
KB
-rwxr-xr-x
2023-05-09 18:39
ip6tables-legacy-restore
96.97
KB
-rwxr-xr-x
2023-05-09 18:39
ip6tables-legacy-save
96.97
KB
-rwxr-xr-x
2023-05-09 18:39
ip6tables-nft
215.32
KB
-rwxr-xr-x
2023-05-09 18:39
ip6tables-nft-restore
215.32
KB
-rwxr-xr-x
2023-05-09 18:39
ip6tables-nft-save
215.32
KB
-rwxr-xr-x
2023-05-09 18:39
ip6tables-restore
96.97
KB
-rwxr-xr-x
2023-05-09 18:39
ip6tables-restore-translate
215.32
KB
-rwxr-xr-x
2023-05-09 18:39
ip6tables-save
96.97
KB
-rwxr-xr-x
2023-05-09 18:39
ip6tables-translate
215.32
KB
-rwxr-xr-x
2023-05-09 18:39
iptables
96.97
KB
-rwxr-xr-x
2023-05-09 18:39
iptables-apply
6.89
KB
-rwxr-xr-x
2023-05-09 18:39
iptables-legacy
96.97
KB
-rwxr-xr-x
2023-05-09 18:39
iptables-legacy-restore
96.97
KB
-rwxr-xr-x
2023-05-09 18:39
iptables-legacy-save
96.97
KB
-rwxr-xr-x
2023-05-09 18:39
iptables-nft
215.32
KB
-rwxr-xr-x
2023-05-09 18:39
iptables-nft-restore
215.32
KB
-rwxr-xr-x
2023-05-09 18:39
iptables-nft-save
215.32
KB
-rwxr-xr-x
2023-05-09 18:39
iptables-restore
96.97
KB
-rwxr-xr-x
2023-05-09 18:39
iptables-restore-translate
215.32
KB
-rwxr-xr-x
2023-05-09 18:39
iptables-save
96.97
KB
-rwxr-xr-x
2023-05-09 18:39
iptables-translate
215.32
KB
-rwxr-xr-x
2023-05-09 18:39
isosize
30.23
KB
-rwxr-xr-x
2024-04-09 15:34
killall5
26.38
KB
-rwxr-xr-x
2020-02-13 18:38
ldattach
34.23
KB
-rwxr-xr-x
2024-04-09 15:34
ldconfig
387
B
-rwxr-xr-x
2025-01-29 14:41
ldconfig.real
1
MB
-rwxr-xr-x
2025-01-29 14:41
logsave
14.16
KB
-rwxr-xr-x
2023-10-09 01:56
losetup
110.34
KB
-rwxr-xr-x
2024-04-09 15:34
lsmod
166.36
KB
-rwxr-xr-x
2021-08-17 09:19
luksformat
3.32
KB
-rwxr-xr-x
2020-02-04 13:11
mkdosfs
34.5
KB
-rwxr-xr-x
2018-05-12 22:59
mke2fs
134.62
KB
-rwxr-xr-x
2023-10-09 01:56
mkfs
14.23
KB
-rwxr-xr-x
2024-04-09 15:34
mkfs.bfs
34.23
KB
-rwxr-xr-x
2024-04-09 15:34
mkfs.cramfs
42.16
KB
-rwxr-xr-x
2024-04-09 15:34
mkfs.ext2
134.62
KB
-rwxr-xr-x
2023-10-09 01:56
mkfs.ext3
134.62
KB
-rwxr-xr-x
2023-10-09 01:56
mkfs.ext4
134.62
KB
-rwxr-xr-x
2023-10-09 01:56
mkfs.fat
34.5
KB
-rwxr-xr-x
2018-05-12 22:59
mkfs.minix
106.23
KB
-rwxr-xr-x
2024-04-09 15:34
mkfs.msdos
34.5
KB
-rwxr-xr-x
2018-05-12 22:59
mkfs.vfat
34.5
KB
-rwxr-xr-x
2018-05-12 22:59
mkhomedir_helper
22.17
KB
-rwxr-xr-x
2024-01-10 13:55
mklost+found
14.3
KB
-rwxr-xr-x
2023-10-09 01:56
mkswap
106.23
KB
-rwxr-xr-x
2024-04-09 15:34
modinfo
166.36
KB
-rwxr-xr-x
2021-08-17 09:19
modprobe
166.36
KB
-rwxr-xr-x
2021-08-17 09:19
netplan
798
B
-rwxr-xr-x
2024-06-28 16:59
newusers
98.8
KB
-rwxr-xr-x
2024-02-06 12:49
nfnl_osf
18.3
KB
-rwxr-xr-x
2023-05-09 18:39
nologin
14.3
KB
-rwxr-xr-x
2024-02-06 12:49
pam-auth-update
19.86
KB
-rwxr-xr-x
2021-09-17 06:05
pam_extrausers_chkpwd
42.16
KB
-rwxr-sr-x
2024-01-10 13:55
pam_extrausers_update
42.16
KB
-rwxr-xr-x
2024-01-10 13:55
pam_getenv
2.82
KB
-rwxr-xr-x
2020-08-12 00:15
pam_tally
14.16
KB
-rwxr-xr-x
2024-01-10 13:55
pam_tally2
18.16
KB
-rwxr-xr-x
2024-01-10 13:55
pam_timestamp_check
14.15
KB
-rwxr-xr-x
2024-01-10 13:55
pivot_root
14.23
KB
-rwxr-xr-x
2024-04-09 15:34
poweroff
1.06
MB
-rwxr-xr-x
2023-11-21 20:57
pwck
58.17
KB
-rwxr-xr-x
2024-02-06 12:49
pwconv
54.05
KB
-rwxr-xr-x
2024-02-06 12:49
pwunconv
54.05
KB
-rwxr-xr-x
2024-02-06 12:49
raw
14.23
KB
-rwxr-xr-x
2024-04-09 15:34
readprofile
22.26
KB
-rwxr-xr-x
2024-04-09 15:34
reboot
1.06
MB
-rwxr-xr-x
2023-11-21 20:57
remove-shell
904
B
-rwxr-xr-x
2019-12-07 02:13
resize2fs
66.38
KB
-rwxr-xr-x
2023-10-09 01:56
rfkill
50.23
KB
-rwxr-xr-x
2024-04-09 15:34
rmmod
166.36
KB
-rwxr-xr-x
2021-08-17 09:19
rmt
58.55
KB
-rwxr-xr-x
2023-12-05 05:16
rmt-tar
58.55
KB
-rwxr-xr-x
2023-12-05 05:16
rtacct
48.29
KB
-rwxr-xr-x
2020-02-13 17:21
rtcwake
46.23
KB
-rwxr-xr-x
2024-04-09 15:34
rtmon
78.24
KB
-rwxr-xr-x
2020-02-13 17:21
runlevel
1.06
MB
-rwxr-xr-x
2023-11-21 20:57
runuser
66.23
KB
-rwxr-xr-x
2024-04-09 15:34
service
9.04
KB
-rwxr-xr-x
2019-06-21 18:56
setcap
14.3
KB
-rwxr-xr-x
2023-06-07 13:02
sfdisk
138.23
KB
-rwxr-xr-x
2024-04-09 15:34
shadowconfig
885
B
-rwxr-xr-x
2021-07-14 22:08
shutdown
1.06
MB
-rwxr-xr-x
2023-11-21 20:57
sshd
863.79
KB
-rwxr-xr-x
2024-01-02 17:13
start-stop-daemon
47.32
KB
-rwxr-xr-x
2022-05-25 11:14
sulogin
50.23
KB
-rwxr-xr-x
2024-04-09 15:34
swaplabel
18.23
KB
-rwxr-xr-x
2024-04-09 15:34
swapoff
22.23
KB
-rwxr-xr-x
2024-04-09 15:34
swapon
50.23
KB
-rwxr-xr-x
2024-04-09 15:34
switch_root
14.23
KB
-rwxr-xr-x
2024-04-09 15:34
sysctl
30.23
KB
-rwxr-xr-x
2023-10-31 11:35
tarcat
936
B
-rwxr-xr-x
2023-12-05 05:16
tc
529.45
KB
-rwxr-xr-x
2020-02-13 17:21
telinit
1.06
MB
-rwxr-xr-x
2023-11-21 20:57
tipc
126.23
KB
-rwxr-xr-x
2020-02-13 17:21
tune2fs
106.55
KB
-rwxr-xr-x
2023-10-09 01:56
tzconfig
106
B
-rwxr-xr-x
2025-01-30 21:37
unix_chkpwd
42.15
KB
-rwxr-sr-x
2024-01-10 13:55
unix_update
42.15
KB
-rwxr-xr-x
2024-01-10 13:55
update-ca-certificates
5.29
KB
-rwxr-xr-x
2024-09-24 17:46
update-mime
9.18
KB
-rwxr-xr-x
2019-10-18 23:05
update-passwd
34.56
KB
-rwxr-xr-x
2019-12-16 23:51
update-rc.d
16.76
KB
-rwxr-xr-x
2019-06-21 18:56
useradd
143.71
KB
-rwxr-xr-x
2024-02-06 12:49
userdel
98.89
KB
-rwxr-xr-x
2024-02-06 12:49
usermod
139.49
KB
-rwxr-xr-x
2024-02-06 12:49
veritysetup
51.82
KB
-rwxr-xr-x
2022-01-18 17:36
vigr
68.55
KB
-rwxr-xr-x
2024-02-06 12:49
vipw
68.55
KB
-rwxr-xr-x
2024-02-06 12:49
visudo
218.2
KB
-rwxr-xr-x
2023-04-04 11:56
wipefs
46.23
KB
-rwxr-xr-x
2024-04-09 15:34
wpa_action
1.69
KB
-rwxr-xr-x
2019-08-13 23:12
wpa_cli
152.22
KB
-rwxr-xr-x
2024-08-05 12:19
wpa_supplicant
2.77
MB
-rwxr-xr-x
2024-08-05 12:19
xtables-legacy-multi
96.97
KB
-rwxr-xr-x
2023-05-09 18:39
xtables-monitor
215.32
KB
-rwxr-xr-x
2023-05-09 18:39
xtables-nft-multi
215.32
KB
-rwxr-xr-x
2023-05-09 18:39
zic
62.29
KB
-rwxr-xr-x
2025-01-29 14:41
zramctl
114.34
KB
-rwxr-xr-x
2024-04-09 15:34
Save
Rename
#!/bin/sh ########################################################################### # /usr/bin/service # # A convenient wrapper for the /etc/init.d init scripts. # # This script is a modified version of the /sbin/service utility found on # Red Hat/Fedora systems (licensed GPLv2+). # # Copyright (C) 2006 Red Hat, Inc. All rights reserved. # Copyright (C) 2008 Canonical Ltd. # * August 2008 - Dustin Kirkland <kirkland@canonical.com> # Copyright (C) 2013 Michael Stapelberg <stapelberg@debian.org> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # On Debian GNU/Linux systems, the complete text of the GNU General # Public License can be found in `/usr/share/common-licenses/GPL-2'. ########################################################################### is_ignored_file() { case "$1" in skeleton | README | *.dpkg-dist | *.dpkg-old | rc | rcS | single | reboot | bootclean.sh) return 0 ;; esac return 1 } VERSION="`basename $0` ver. 1.57" USAGE="Usage: `basename $0` < option > | --status-all | \ [ service_name [ command | --full-restart ] ]" SERVICE= ACTION= SERVICEDIR="/etc/init.d" OPTIONS= is_systemd= if [ $# -eq 0 ]; then echo "${USAGE}" >&2 exit 1 fi if [ -d /run/systemd/system ]; then is_systemd=1 fi cd / while [ $# -gt 0 ]; do case "${1}" in --help | -h | --h* ) echo "${USAGE}" >&2 exit 0 ;; --version | -V ) echo "${VERSION}" >&2 exit 0 ;; *) if [ -z "${SERVICE}" -a $# -eq 1 -a "${1}" = "--status-all" ]; then cd ${SERVICEDIR} for SERVICE in * ; do case "${SERVICE}" in functions | halt | killall | single| linuxconf| kudzu) ;; *) if ! is_ignored_file "${SERVICE}" \ && [ -x "${SERVICEDIR}/${SERVICE}" ]; then out=$(env -i LANG="$LANG" LANGUAGE="$LANGUAGE" LC_CTYPE="$LC_CTYPE" LC_NUMERIC="$LC_NUMERIC" LC_TIME="$LC_TIME" LC_COLLATE="$LC_COLLATE" LC_MONETARY="$LC_MONETARY" LC_MESSAGES="$LC_MESSAGES" LC_PAPER="$LC_PAPER" LC_NAME="$LC_NAME" LC_ADDRESS="$LC_ADDRESS" LC_TELEPHONE="$LC_TELEPHONE" LC_MEASUREMENT="$LC_MEASUREMENT" LC_IDENTIFICATION="$LC_IDENTIFICATION" LC_ALL="$LC_ALL" PATH="$PATH" TERM="$TERM" "$SERVICEDIR/$SERVICE" status 2>&1) retval=$? if echo "$out" | egrep -iq "usage:"; then #printf " %s %-60s %s\n" "[?]" "$SERVICE:" "unknown" 1>&2 echo " [ ? ] $SERVICE" 1>&2 continue else if [ "$retval" = "0" -a -n "$out" ]; then #printf " %s %-60s %s\n" "[+]" "$SERVICE:" "running" echo " [ + ] $SERVICE" continue else #printf " %s %-60s %s\n" "[-]" "$SERVICE:" "NOT running" echo " [ - ] $SERVICE" continue fi fi #env -i LANG="$LANG" LANGUAGE="$LANGUAGE" LC_CTYPE="$LC_CTYPE" LC_NUMERIC="$LC_NUMERIC" LC_TIME="$LC_TIME" LC_COLLATE="$LC_COLLATE" LC_MONETARY="$LC_MONETARY" LC_MESSAGES="$LC_MESSAGES" LC_PAPER="$LC_PAPER" LC_NAME="$LC_NAME" LC_ADDRESS="$LC_ADDRESS" LC_TELEPHONE="$LC_TELEPHONE" LC_MEASUREMENT="$LC_MEASUREMENT" LC_IDENTIFICATION="$LC_IDENTIFICATION" LC_ALL="$LC_ALL" PATH="$PATH" TERM="$TERM" "$SERVICEDIR/$SERVICE" status fi ;; esac done exit 0 elif [ $# -eq 2 -a "${2}" = "--full-restart" ]; then SERVICE="${1}" # On systems using systemd, we just perform a normal restart: # A restart with systemd is already a full restart. if [ -n "$is_systemd" ]; then ACTION="restart" else if [ -x "${SERVICEDIR}/${SERVICE}" ]; then env -i LANG="$LANG" LANGUAGE="$LANGUAGE" LC_CTYPE="$LC_CTYPE" LC_NUMERIC="$LC_NUMERIC" LC_TIME="$LC_TIME" LC_COLLATE="$LC_COLLATE" LC_MONETARY="$LC_MONETARY" LC_MESSAGES="$LC_MESSAGES" LC_PAPER="$LC_PAPER" LC_NAME="$LC_NAME" LC_ADDRESS="$LC_ADDRESS" LC_TELEPHONE="$LC_TELEPHONE" LC_MEASUREMENT="$LC_MEASUREMENT" LC_IDENTIFICATION="$LC_IDENTIFICATION" LC_ALL="$LC_ALL" PATH="$PATH" TERM="$TERM" "$SERVICEDIR/$SERVICE" stop env -i LANG="$LANG" LANGUAGE="$LANGUAGE" LC_CTYPE="$LC_CTYPE" LC_NUMERIC="$LC_NUMERIC" LC_TIME="$LC_TIME" LC_COLLATE="$LC_COLLATE" LC_MONETARY="$LC_MONETARY" LC_MESSAGES="$LC_MESSAGES" LC_PAPER="$LC_PAPER" LC_NAME="$LC_NAME" LC_ADDRESS="$LC_ADDRESS" LC_TELEPHONE="$LC_TELEPHONE" LC_MEASUREMENT="$LC_MEASUREMENT" LC_IDENTIFICATION="$LC_IDENTIFICATION" LC_ALL="$LC_ALL" PATH="$PATH" TERM="$TERM" "$SERVICEDIR/$SERVICE" start exit $? fi fi elif [ -z "${SERVICE}" ]; then SERVICE="${1}" elif [ -z "${ACTION}" ]; then ACTION="${1}" else OPTIONS="${OPTIONS} ${1}" fi shift ;; esac done run_via_sysvinit() { # Otherwise, use the traditional sysvinit if [ -x "${SERVICEDIR}/${SERVICE}" ]; then exec env -i LANG="$LANG" LANGUAGE="$LANGUAGE" LC_CTYPE="$LC_CTYPE" LC_NUMERIC="$LC_NUMERIC" LC_TIME="$LC_TIME" LC_COLLATE="$LC_COLLATE" LC_MONETARY="$LC_MONETARY" LC_MESSAGES="$LC_MESSAGES" LC_PAPER="$LC_PAPER" LC_NAME="$LC_NAME" LC_ADDRESS="$LC_ADDRESS" LC_TELEPHONE="$LC_TELEPHONE" LC_MEASUREMENT="$LC_MEASUREMENT" LC_IDENTIFICATION="$LC_IDENTIFICATION" LC_ALL="$LC_ALL" PATH="$PATH" TERM="$TERM" "$SERVICEDIR/$SERVICE" ${ACTION} ${OPTIONS} else echo "${SERVICE}: unrecognized service" >&2 exit 1 fi } update_openrc_started_symlinks() { # maintain the symlinks of /run/openrc/started so that # rc-status works with the service command as well if [ -d /run/openrc/started ] ; then case "${ACTION}" in start) if [ ! -h /run/openrc/started/$SERVICE ] ; then ln -s $SERVICEDIR/$SERVICE /run/openrc/started/$SERVICE || true fi ;; stop) rm /run/openrc/started/$SERVICE || true ;; esac fi } # When this machine is running systemd, standard service calls are turned into # systemctl calls. if [ -n "$is_systemd" ] then UNIT="${SERVICE%.sh}.service" # avoid deadlocks during bootup and shutdown from units/hooks # which call "invoke-rc.d service reload" and similar, since # the synchronous wait plus systemd's normal behaviour of # transactionally processing all dependencies first easily # causes dependency loops if ! systemctl --quiet is-active multi-user.target; then sctl_args="--job-mode=ignore-dependencies" fi case "${ACTION}" in restart|status|try-restart) exec systemctl $sctl_args ${ACTION} ${UNIT} ;; start|stop) # Follow the principle of least surprise for SysV people: # When running "service foo stop" and foo happens to be a service that # has one or more .socket files, we also stop the .socket units. # Users who need more control will use systemctl directly. for unit in $(systemctl list-unit-files --full --type=socket 2>/dev/null | sed -ne 's/\.socket\s*[a-z]*\s*$/.socket/p'); do if [ "$(systemctl -p Triggers show $unit)" = "Triggers=${UNIT}" ]; then systemctl $sctl_args ${ACTION} $unit fi done exec systemctl $sctl_args ${ACTION} ${UNIT} ;; reload) _canreload="$(systemctl -p CanReload show ${UNIT} 2>/dev/null)" if [ "$_canreload" = "CanReload=no" ]; then # The reload action falls back to the sysv init script just in case # the systemd service file does not (yet) support reload for a # specific service. run_via_sysvinit else exec systemctl $sctl_args reload "${UNIT}" fi ;; force-stop) exec systemctl --signal=KILL kill "${UNIT}" ;; force-reload) _canreload="$(systemctl -p CanReload show ${UNIT} 2>/dev/null)" if [ "$_canreload" = "CanReload=no" ]; then exec systemctl $sctl_args restart "${UNIT}" else exec systemctl $sctl_args reload "${UNIT}" fi ;; *) # We try to run non-standard actions by running # the init script directly. run_via_sysvinit ;; esac fi update_openrc_started_symlinks run_via_sysvinit