diff --git a/conf/systemd.service b/conf/systemd.service index 33d5b0b..22c4f63 100755 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,11 +7,12 @@ Type=simple User=__APP__ Group=__APP__ WorkingDirectory=__FINALPATH__ -Environment="PATH=__ENV_PATH__" -Environment=NODE_ENV=production -ExecStart=__YNH_NODE__ __FINALPATH__/tiddlywiki monwiki --listen port=__port__ authenticated-user-header=basic +ExecStart=__NODEJS_PATH__/node __FINALPATH__/tiddlywiki monwiki --listen port=__port__ authenticated-user-header=basic Restart=always +Environment=PATH=/usr/bin:/usr/local/bin:__NODEJS_PATH__ +Environment=NODE_ENV=production [Install] WantedBy=multi-user.target + diff --git a/manifest.json b/manifest.json index f96f934..0dd0eb9 100644 --- a/manifest.json +++ b/manifest.json @@ -38,8 +38,8 @@ "en": "Choose a path for TiddlyWiki", "fr": "Choisissez un chemin pour TiddlyWiki" }, - "example": "/tiddlywiki", - "default": "/tiddlywiki" + "example": "/", + "default": "/" }, { "name": "is_public", diff --git a/scripts/_common.sh b/scripts/_common.sh index d7982dd..7912aa4 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -17,16 +17,3 @@ nodejs_version=14 #================================================= # FUTURE OFFICIAL HELPERS #================================================= - -# Execute a command as another user -# usage: ynh_exec_as USER COMMAND [ARG ...] -ynh_exec_as() { - local USER=$1 - shift 1 - - if [[ $USER = $(whoami) ]]; then - eval "$@" - else - sudo -u "$USER" "$@" - fi -}