summaryrefslogtreecommitdiffstats
path: root/abs/core/poweroff-scripts/poweroff.script
blob: dc42a14eb43ebf070366fa5a5e11955318dfcde1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash
MYTH_RUN_STATUS="1"
. /etc/profile
INIT=`ps -p 1 -o comm=`

#ignore -d option
if [ x$1 = x-d ]
then
    exit 0
fi

if [ x$INIT = xrunit ]
then
    shutdown -h
else
    systemctl poweroff $@
fi