diff options
-rw-r--r-- | bin/ncp/SYSTEM/nc-ramlogs.sh | 23 | ||||
-rw-r--r-- | changelog.md | 4 |
2 files changed, 8 insertions, 19 deletions
diff --git a/bin/ncp/SYSTEM/nc-ramlogs.sh b/bin/ncp/SYSTEM/nc-ramlogs.sh index f34f3f74..8c6f67e3 100644 --- a/bin/ncp/SYSTEM/nc-ramlogs.sh +++ b/bin/ncp/SYSTEM/nc-ramlogs.sh @@ -12,22 +12,7 @@ is_active() { - systemctl -q is-active log2ram &>/dev/null -} - -find_unit_name() -{ - UNIT_NAME="" - entry=$(systemctl list-unit-files --no-pager | grep -e ramlog) - if [[ -z "$entry" ]] - then - UNIT_NAME="" - elif [[ $entry == *armbian-ramlog* ]] - then - UNIT_NAME=armbian-ramlog - else - UNIT_NAME=log2ram - fi + systemctl -q is-active log2ram &>/dev/null || systemctl -q is-active armbian-ramlog &>/dev/null } install() @@ -53,8 +38,10 @@ configure() echo "Logs in SD. Reboot to take effect" return } - systemctl enable "$UNIT_NAME" - systemctl start "$UNIT_NAME" + + [[ -f /lib/systemd/system/armbian-ramlog.service ]] && local ramlog=armbian-ramlog || local ramlog=log2ram + systemctl enable "$ramlog" + systemctl start "$ramlog" echo "Logs in RAM. Reboot to take effect" } diff --git a/changelog.md b/changelog.md index 583c5117..509c1771 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,7 @@ -[v1.3.2](https://github.com/nextcloud/nextcloudpi/commit/86c5bef) (2019-01-14) nc-automount: fix description +[v1.3.3](https://github.com/nextcloud/nextcloudpi/commit/f53bfd2) (2019-01-14) nc-ramlog: adapt to armbian + +[v1.3.2](https://github.com/nextcloud/nextcloudpi/commit/be9a546) (2019-01-14) nc-automount: fix description [v1.3.1 ](https://github.com/nextcloud/nextcloudpi/commit/61e3ff3) (2019-01-13) ncp-update: fail if version cant be parsed |