From 16aa2a0c397b3b45bc43345fa115f60e2605102b Mon Sep 17 00:00:00 2001 From: Jules Bertholet Date: Sat, 25 Jun 2022 00:10:35 -0400 Subject: [PATCH] Change install location to `/var/www` --- README.md | 2 +- README_fr.md | 2 +- conf/systemd.service | 2 +- doc/DISCLAIMER.md | 2 +- doc/DISCLAIMER_fr.md | 2 +- scripts/_common.sh | 6 +++--- scripts/install | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index ecc1eb0..83a7ee1 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ Inspired by the Invidious project. This app requires a dedicated root domain. -Nitter config file is stored in `/opt/yunohost/nitter/nitter.conf` (for the first instance, subsequent installs will go in `nitter__2`, `nitter__3`, etc). Users can override the defaults and set custom settings at `https://instance-domain.tld/settings`. +Nitter config file is stored in `/var/www/nitter/nitter.conf` (for the first instance, subsequent installs will go in `nitter__2`, `nitter__3`, etc). Users can override the defaults and set custom settings at `https://instance-domain.tld/settings`. ## Documentation and resources * Official app website: diff --git a/README_fr.md b/README_fr.md index 308ecb8..ede0536 100644 --- a/README_fr.md +++ b/README_fr.md @@ -43,7 +43,7 @@ Nitter est une interface alternative pour Twitter qui est plus rapide que le sit Cette application nécéssite un domaine dedié. -Le ficher de configuration de Nitter se trouve à `/opt/yunohost/nitter/nitter.conf` (pour la première installation, les prochaines installations iront dans `nitter__2`, `nitter__3`, etc). Les utilisateurs peuvent modifier les paramétres par défaut en visitant `https://instance-domain.tld/settings`. +Le ficher de configuration de Nitter se trouve à `/var/www/nitter/nitter.conf` (pour la première installation, les prochaines installations iront dans `nitter__2`, `nitter__3`, etc). Les utilisateurs peuvent modifier les paramétres par défaut en visitant `https://instance-domain.tld/settings`. ## Documentations et ressources * Site officiel de l'app : diff --git a/conf/systemd.service b/conf/systemd.service index f5b1660..2baab68 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,7 +7,7 @@ Type=simple User=__APP__ Group=__APP__ WorkingDirectory=__FINALPATH__/ -ExecStart=__FINALPATH__/nitter >> +ExecStart=__FINALPATH__/nitter StandardOutput=append:/var/log/__APP__/__APP__.log StandardError=inherit diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md index fb64659..13498c0 100644 --- a/doc/DISCLAIMER.md +++ b/doc/DISCLAIMER.md @@ -2,4 +2,4 @@ This app requires a dedicated root domain. -Nitter config file is stored in `/opt/yunohost/nitter/nitter.conf` (for the first instance, subsequent installs will go in `nitter__2`, `nitter__3`, etc). Users can override the defaults and set custom settings at `https://instance-domain.tld/settings`. \ No newline at end of file +Nitter config file is stored in `/var/www/nitter/nitter.conf` (for the first instance, subsequent installs will go in `nitter__2`, `nitter__3`, etc). Users can override the defaults and set custom settings at `https://instance-domain.tld/settings`. \ No newline at end of file diff --git a/doc/DISCLAIMER_fr.md b/doc/DISCLAIMER_fr.md index c606451..c4e2e4a 100644 --- a/doc/DISCLAIMER_fr.md +++ b/doc/DISCLAIMER_fr.md @@ -2,4 +2,4 @@ Cette application nécéssite un domaine dedié. -Le ficher de configuration de Nitter se trouve à `/opt/yunohost/nitter/nitter.conf` (pour la première installation, les prochaines installations iront dans `nitter__2`, `nitter__3`, etc). Les utilisateurs peuvent modifier les paramétres par défaut en visitant `https://instance-domain.tld/settings`. \ No newline at end of file +Le ficher de configuration de Nitter se trouve à `/var/www/nitter/nitter.conf` (pour la première installation, les prochaines installations iront dans `nitter__2`, `nitter__3`, etc). Les utilisateurs peuvent modifier les paramétres par défaut en visitant `https://instance-domain.tld/settings`. \ No newline at end of file diff --git a/scripts/_common.sh b/scripts/_common.sh index 4b30a3c..73bc8ac 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -14,9 +14,9 @@ pkg_dependencies="acl nim libsass-dev" function build_nitter { pushd "$final_path" chown -R $app:$app $final_path - sudo -u $app env "PATH=/opt/yunohost/$app/nim-installation/bin:$(sudo -u $app sh -c 'echo $PATH')" nimble build -d:release -y -d:danger --passC:"-flto" --passL:"-flto" 2>&1 - sudo -u $app env "PATH=/opt/yunohost/$app/nim-installation/bin:$(sudo -u $app sh -c 'echo $PATH')" strip -s nitter 2>&1 - sudo -u $app env "PATH=/opt/yunohost/$app/nim-installation/bin:$(sudo -u $app sh -c 'echo $PATH')" nimble scss -y 2>&1 + sudo -u $app env "PATH=/var/www/$app/nim-installation/bin:$(sudo -u $app sh -c 'echo $PATH')" nimble build -d:release -y -d:danger --passC:"-flto" --passL:"-flto" 2>&1 + sudo -u $app env "PATH=/var/www/$app/nim-installation/bin:$(sudo -u $app sh -c 'echo $PATH')" strip -s nitter 2>&1 + sudo -u $app env "PATH=/var/www/$app/nim-installation/bin:$(sudo -u $app sh -c 'echo $PATH')" nimble scss -y 2>&1 mkdir -p $final_path/tmp chown -R root:root $final_path popd diff --git a/scripts/install b/scripts/install index 49812e0..bdcb2ff 100755 --- a/scripts/install +++ b/scripts/install @@ -41,7 +41,7 @@ hmac_key=$(ynh_string_random --length=64) #================================================= ynh_script_progression --message="Validating installation parameters..." --weight=1 -final_path=/opt/yunohost/$app +final_path=/var/www/$app test ! -e "$final_path" || ynh_die --message="This path already contains a folder" # Register (book) web path