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
|
||||
cp sbin/wp-cron.sh /usr/local/sbin/
|
||||
chmod 755 /usr/local/sbin/wp-cron.sh
|
||||
cp systemd/wp-cron.* /usr/lib/systemd/system/
|
||||
chmod 644 /usr/lib/systemd/system/wp-cron.*
|
||||
if [[ ! -d /usr/local/lib/systemd/system ]]; then
|
||||
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 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
|
||||
|
||||
# check systemd timer for update
|
||||
if ! diff -q systemd/wp-cron.service /usr/lib/systemd/system/wp-cron.service ; then
|
||||
cp systemd/wp-cron.service /usr/lib/systemd/system/wp-cron.service
|
||||
chmod 644 /usr/lib/systemd/system/wp-cron.service
|
||||
if ! diff -q systemd/wp-cron.service /usr/local/lib/systemd/system/wp-cron.service ; then
|
||||
cp systemd/wp-cron.service /usr/local/lib/systemd/system/wp-cron.service
|
||||
chmod 644 /usr/local/lib/systemd/system/wp-cron.service
|
||||
echo "systemd/wp-cron.service updated"
|
||||
echo
|
||||
fi
|
||||
if ! diff -q systemd/wp-cron.timer /usr/lib/systemd/system/wp-cron.timer ; then
|
||||
cp systemd/wp-cron.timer /usr/lib/systemd/system/wp-cron.timer
|
||||
chmod 644 /usr/lib/systemd/system/wp-cron.timer
|
||||
if ! diff -q systemd/wp-cron.timer /usr/local/lib/systemd/system/wp-cron.timer ; then
|
||||
cp systemd/wp-cron.timer /usr/local/lib/systemd/system/wp-cron.timer
|
||||
chmod 644 /usr/local/lib/systemd/system/wp-cron.timer
|
||||
echo "systemd/wp-cron.timer updated"
|
||||
echo
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue
Block a user