install systemd configs in /usr/local/lib/systemd/system/
This commit is contained in:
parent
754eb0927e
commit
3422156801
|
@ -26,7 +26,10 @@ chmod 755 /usr/local/bin/wp-*
|
||||||
# install & enable wp systemd cron
|
# install & enable wp systemd cron
|
||||||
cp sbin/wp-cron.sh /usr/local/sbin/
|
cp sbin/wp-cron.sh /usr/local/sbin/
|
||||||
chmod 755 /usr/local/sbin/wp-cron.sh
|
chmod 755 /usr/local/sbin/wp-cron.sh
|
||||||
cp systemd/wp-cron.* /usr/lib/systemd/system/
|
if [[ ! -d /usr/local/lib/systemd/system ]]; then
|
||||||
chmod 644 /usr/lib/systemd/system/wp-cron.*
|
mkdir -p /usr/local/lib/systemd/system
|
||||||
|
fi
|
||||||
|
cp systemd/wp-cron.* /usr/local/lib/systemd/system/
|
||||||
|
chmod 644 /usr/local/lib/systemd/system/wp-cron.*
|
||||||
systemctl enable wp-cron.timer
|
systemctl enable wp-cron.timer
|
||||||
systemctl start wp-cron.timer
|
systemctl start wp-cron.timer
|
||||||
|
|
12
update.sh
12
update.sh
|
@ -47,15 +47,15 @@ if ! diff -q sbin/wp-cron.sh /usr/local/sbin/wp-cron.sh ; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# check systemd timer for update
|
# check systemd timer for update
|
||||||
if ! diff -q systemd/wp-cron.service /usr/lib/systemd/system/wp-cron.service ; then
|
if ! diff -q systemd/wp-cron.service /usr/local/lib/systemd/system/wp-cron.service ; then
|
||||||
cp systemd/wp-cron.service /usr/lib/systemd/system/wp-cron.service
|
cp systemd/wp-cron.service /usr/local/lib/systemd/system/wp-cron.service
|
||||||
chmod 644 /usr/lib/systemd/system/wp-cron.service
|
chmod 644 /usr/local/lib/systemd/system/wp-cron.service
|
||||||
echo "systemd/wp-cron.service updated"
|
echo "systemd/wp-cron.service updated"
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
if ! diff -q systemd/wp-cron.timer /usr/lib/systemd/system/wp-cron.timer ; then
|
if ! diff -q systemd/wp-cron.timer /usr/local/lib/systemd/system/wp-cron.timer ; then
|
||||||
cp systemd/wp-cron.timer /usr/lib/systemd/system/wp-cron.timer
|
cp systemd/wp-cron.timer /usr/local/lib/systemd/system/wp-cron.timer
|
||||||
chmod 644 /usr/lib/systemd/system/wp-cron.timer
|
chmod 644 /usr/local/lib/systemd/system/wp-cron.timer
|
||||||
echo "systemd/wp-cron.timer updated"
|
echo "systemd/wp-cron.timer updated"
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user