mirror of
https://github.com/YunoHost-Apps/distbin_ynh.git
synced 2024-09-03 18:26:10 +02:00
Change install order
This commit is contained in:
parent
bded6ee229
commit
6091cb7724
1 changed files with 6 additions and 5 deletions
|
@ -35,9 +35,9 @@ is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||||
### The id of the app as stated in the manifest is available as $YNH_APP_ID
|
### The id of the app as stated in the manifest is available as $YNH_APP_ID
|
||||||
### The instance number is available as $YNH_APP_INSTANCE_NUMBER (equals "1", "2", ...)
|
### The instance number is available as $YNH_APP_INSTANCE_NUMBER (equals "1", "2", ...)
|
||||||
### The app instance name is available as $YNH_APP_INSTANCE_NAME
|
### The app instance name is available as $YNH_APP_INSTANCE_NAME
|
||||||
### - the first time the app is installed, YNH_APP_INSTANCE_NAME = distbin
|
### - the first time the app is installed, YNH_APP_INSTANCE_NAME = ynhexample
|
||||||
### - the second time the app is installed, YNH_APP_INSTANCE_NAME = distbin__2
|
### - the second time the app is installed, YNH_APP_INSTANCE_NAME = ynhexample__2
|
||||||
### - distbin__{N} for the subsequent installations, with N=3,4, ...
|
### - ynhexample__{N} for the subsequent installations, with N=3,4, ...
|
||||||
### The app instance name is probably what interests you most, since this is
|
### The app instance name is probably what interests you most, since this is
|
||||||
### guaranteed to be unique. This is a good unique identifier to define installation path,
|
### guaranteed to be unique. This is a good unique identifier to define installation path,
|
||||||
### db names, ...
|
### db names, ...
|
||||||
|
@ -170,11 +170,10 @@ ynh_system_user_create $app $final_path
|
||||||
# ...
|
# ...
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
chown -R $app: $final_path
|
|
||||||
|
|
||||||
mkdir -p /var/log/$app
|
mkdir -p /var/log/$app
|
||||||
chown -R $app:$app /var/log/$app
|
chown -R $app:$app /var/log/$app
|
||||||
|
|
||||||
|
chown -R $app: $final_path
|
||||||
pushd $final_path
|
pushd $final_path
|
||||||
ynh_use_nodejs
|
ynh_use_nodejs
|
||||||
sudo -u $app env PATH=$PATH:$nodejs_path npm install hoek@^4.2.1 --save
|
sudo -u $app env PATH=$PATH:$nodejs_path npm install hoek@^4.2.1 --save
|
||||||
|
@ -240,6 +239,8 @@ systemctl start $app
|
||||||
### `ynh_replace_string` is used to replace a string in a file.
|
### `ynh_replace_string` is used to replace a string in a file.
|
||||||
### (It's compatible with sed regular expressions syntax)
|
### (It's compatible with sed regular expressions syntax)
|
||||||
|
|
||||||
|
#ynh_replace_string "match_string" "replace_string" "$final_path/CONFIG_FILE"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STORE THE CONFIG FILE CHECKSUM
|
# STORE THE CONFIG FILE CHECKSUM
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue