Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornachoparker <nacho@ownyourbits.com>2018-03-03 14:46:04 +0300
committernachoparker <nacho@ownyourbits.com>2018-03-04 18:59:06 +0300
commit18e35dfdbb5a828c646a6c0e24a394840123cfbf (patch)
tree0c9721ebb306033d74b941d71f9f004d3479484c /update.sh
parent45a8800cd8a49bd2960f96f0d64557cbf0c6cf30 (diff)
nc-automount: fix dependenciesv0.46.37
Diffstat (limited to 'update.sh')
-rwxr-xr-xupdate.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/update.sh b/update.sh
index 34125d56..fa27fe32 100755
--- a/update.sh
+++ b/update.sh
@@ -222,6 +222,28 @@ EOF
grep -q '^ACTIVE_=yes$' /usr/local/etc/nextcloudpi-config.d/samba.sh || \
update-rc.d nmbd disable
+ # fix automount dependencies with other ncp-apps
+ sed -i \
+ 's|^Before=.*|Before=mysqld.service dphys-swapfile.service fail2ban.service smbd.service nfs-server.service|' \
+ /usr/lib/systemd/system/nc-automount.service
+
+ sed -i \
+ 's|^Before=.*|Before=nc-automount.service|' \
+ /usr/lib/systemd/system/nc-automount-links.service
+
+ # fix ramlogs dependencies with other ncp-apps
+ sed -i \
+ 's|^Before=.*|Before=redis-server.service apache2.service mysqld.service|' \
+ /usr/lib/systemd/system/ramlogs.service
+
+ # adjust when other services start
+ DBUNIT=/lib/systemd/system/mariadb.service
+ F2BUNIT=/lib/systemd/system/fail2ban.service
+ SWPUNIT=/etc/init.d/dphys-swapfile
+ grep -q sleep "$DBUNIT" || sed -i "/^ExecStart=/iExecStartPre=/bin/sleep 10" "$DBUNIT"
+ grep -q sleep "$F2BUNIT" || sed -i "/^ExecStart=/iExecStartPre=/bin/sleep 10" "$F2BUNIT"
+ grep -q sleep "$SWPUNIT" || sed -i "/\<start)/asleep 30" "$SWPUNIT"
+
} # end - only live updates
exit 0