mirror of
https://github.com/YunoHost-Apps/scrumblr_ynh.git
synced 2024-09-03 20:16:29 +02:00
Update _common
This commit is contained in:
parent
a8f18f0ac8
commit
b1ea07a6a6
1 changed files with 19 additions and 0 deletions
|
@ -3,3 +3,22 @@ extract_source() {
|
||||||
sudo git clone https://github.com/aliasaria/scrumblr.git /var/www/$app \
|
sudo git clone https://github.com/aliasaria/scrumblr.git /var/www/$app \
|
||||||
|| ynh_die "Unable to download source"
|
|| ynh_die "Unable to download source"
|
||||||
}
|
}
|
||||||
|
check_or_install_npm() {
|
||||||
|
if ! dpkg -s npm | grep "installed" > /dev/null 2>&1 \
|
||||||
|
|| ! dpkg -s nodejs-legacy | grep "installed" > /dev/null 2>&1; then
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y npm nodejs-legacy
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
pre_inst_scrumblr() {
|
||||||
|
# Add user if not exist
|
||||||
|
id -g "$app" &>/dev/null || sudo addgroup "$app" --system --quiet
|
||||||
|
id -u "$app" &>/dev/null || sudo adduser "$app" \
|
||||||
|
--ingroup "$app" --system --quiet --shell /bin/bash
|
||||||
|
|
||||||
|
# Configure init script
|
||||||
|
sudo cp ../conf/"$app".service /etc/systemd/system/
|
||||||
|
sudo systemctl daemon-reload
|
||||||
|
sudo systemctl enable "$app".service
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue