From 4cacb750b8bb43d26b47d7dead3564393360fc4e Mon Sep 17 00:00:00 2001 From: chbmb Date: Sat, 30 May 2020 23:05:13 +0100 Subject: [PATCH] occ & updater.phar Create aliases in /usr/bin to enable easier use of both common commands --- root/etc/cont-init.d/70-aliases | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 root/etc/cont-init.d/70-aliases diff --git a/root/etc/cont-init.d/70-aliases b/root/etc/cont-init.d/70-aliases new file mode 100644 index 0000000..48c3fdd --- /dev/null +++ b/root/etc/cont-init.d/70-aliases @@ -0,0 +1,15 @@ +#!/usr/bin/with-contenv bash + +## Set alias for occ and make executable +[[ ! -f /usr/bin/occ ]] && \ + echo -e '#!/bin/bash\nsudo -u abc php7 /config/www/nextcloud/occ' > /usr/bin/occ + +[[ ! -x /usr/bin/occ ]] && \ + chmod +x /usr/bin/occ + +## Set alias for updater.phar and make executable +[[ ! -f /usr/bin/updater.phar ]] && \ + echo -e '#!/bin/bash\nsudo -u abc php7 /config/www/nextcloud/updater/updater.phar' > /usr/bin/updater.phar + +[[ ! -x /usr/bin/updater.phar ]] && \ + chmod +x /usr/bin/updater.phar