From b99c050817ec73d9396427351b81ac2874fd96ba Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 9 Mar 2022 01:15:25 +0100 Subject: [PATCH] fix install --- scripts/install | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/scripts/install b/scripts/install index 59e1f8b..2ed8bc1 100755 --- a/scripts/install +++ b/scripts/install @@ -104,13 +104,10 @@ chmod 750 "$datadir" chmod -R o-rwx "$datadir" chown -R $app:www-data "$datadir" - -if [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then - pushd $datadir - curl -LO http://download.kiwix.org/zim/wikipedia/wikipedia_en_computer_maxi_2022-02.zim > /dev/null - popd - sudo -u $app $final_path/kiwix-manage $datadir/library.xml add $datadir/*.zim -fi +pushd $datadir + ynh_exec_as $app curl -LO http://download.kiwix.org/zim/wikipedia/wikipedia_en_computer_maxi_2022-02.zim > /dev/null +popd +ynh_exec_as $app $final_path/kiwix-manage $datadir/library.xml add $datadir/*.zim #================================================= # SETUP SYSTEMD