2 Commits

Author SHA1 Message Date
96a0aefa1d rc.local.start: make sure to run /etc/rc.local only once 2020-09-05 16:27:13 +07:00
7aa0d2f443 +x 2020-09-05 11:47:26 +07:00
2 changed files with 11 additions and 3 deletions

View File

@@ -1,10 +1,15 @@
#!/bin/sh #!/bin/sh
[ ! -x @SYSCONFDIR@/rc.local ] && cat > @SYSCONFDIR@/rc.local << EOF if [ ! -x @SYSCONFDIR@/rc.local ]; then
cat > @SYSCONFDIR@/rc.local << EOF
# @SYSCONFDIR@/rc.local -- rc.local for Artix Linux # @SYSCONFDIR@/rc.local -- rc.local for Artix Linux
# #
# Enter your custom commands here. It will be executed on stage 2 # Enter your custom commands here. It will be executed on stage 2
# before running services. # before running services.
EOF EOF
chmod +x @SYSCONFDIR@/rc.local
fi
. @SYSCONFDIR@/rc.local # Execute rc.local only once.
# If artix-branding-base exists, that one will execute rc.local instead.
[ ! -x @SYSCONFDIR@/local.d/local.start ] && . @SYSCONFDIR@/rc.local

View File

@@ -1,10 +1,13 @@
#!/bin/sh #!/bin/sh
[ ! -x @SYSCONFDIR@/rc.shutdown ] && cat > @SYSCONFDIR@/rc.shutdown << EOF if [ ! -x @SYSCONFDIR@/rc.shutdown ]; then
cat > @SYSCONFDIR@/rc.shutdown << EOF
# @SYSCONFDIR@/rc.shutdown -- rc.shutdown for Artix Linux # @SYSCONFDIR@/rc.shutdown -- rc.shutdown for Artix Linux
# #
# Enter your custom commands here. It will be executed on stage 3 # Enter your custom commands here. It will be executed on stage 3
# after stopping services. # after stopping services.
EOF EOF
chmod +x @SYSCONFDIR@/rc.shutdown
fi
. @SYSCONFDIR@/rc.shutdown . @SYSCONFDIR@/rc.shutdown