mirror of
https://github.com/YunoHost-Apps/kresus_ynh.git
synced 2024-09-03 19:36:10 +02:00
Remove tabs by 4 spaces
This commit is contained in:
parent
3b88e72a01
commit
62e3f4c303
1 changed files with 21 additions and 21 deletions
|
@ -6,40 +6,40 @@ set -eu
|
|||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
# Retrieve arguments
|
||||
domain=$YNH_APP_ARG_DOMAIN
|
||||
path=$YNH_APP_ARG_PATH
|
||||
domain=$YNH_APP_ARG_DOMAIN
|
||||
path=$YNH_APP_ARG_PATH
|
||||
|
||||
# Source YunoHost helpers
|
||||
source /usr/share/yunohost/helpers
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
# Check domain/path availability
|
||||
sudo yunohost app checkurl "${domain}${path}" -a "$app" \
|
||||
|| ynh_die "Path not available: ${domain}${path}"
|
||||
sudo yunohost app checkurl "${domain}${path}" -a "$app" \
|
||||
|| ynh_die "Path not available: ${domain}${path}"
|
||||
|
||||
# Install dependencies
|
||||
sudo apt-get update
|
||||
sudo apt-get update
|
||||
sudo apt-get install nodejs-legacy npm python-pip python-dev python-lxml python-imaging -y -qq
|
||||
sudo pip install weboob
|
||||
|
||||
# Build the app
|
||||
src_path=/home/yunohost.app/$app
|
||||
sudo git clone https://framagit.org/bnjbvr/kresus.git $src_path
|
||||
sudo mkdir -p $src_path $src_path/node_modules
|
||||
sudo npm install --prefix $src_path $src_path
|
||||
sudo sh -c "cd $src_path && ./scripts/build.sh"
|
||||
src_path=/home/yunohost.app/$app
|
||||
sudo git clone https://framagit.org/bnjbvr/kresus.git $src_path
|
||||
sudo mkdir -p $src_path $src_path/node_modules
|
||||
sudo npm install --prefix $src_path $src_path
|
||||
sudo sh -c "cd $src_path && ./scripts/build.sh"
|
||||
|
||||
# Modify Nginx configuration file and copy it to Nginx conf directory
|
||||
nginx_conf=../conf/nginx.conf
|
||||
sed -i "s@YNH_WWW_PATH@$path@g" $nginx_conf
|
||||
sudo cp $nginx_conf /etc/nginx/conf.d/$domain.d/$app.conf
|
||||
nginx_conf=../conf/nginx.conf
|
||||
sed -i "s@YNH_WWW_PATH@$path@g" $nginx_conf
|
||||
sudo cp $nginx_conf /etc/nginx/conf.d/$domain.d/$app.conf
|
||||
|
||||
# Setup service
|
||||
systemd_service=../conf/kresus.service
|
||||
sed -i "s@YNH_HOME@$src_path@g" $systemd_service
|
||||
sed -i "s@YNH_WWW_PATH@$path@g" $systemd_service
|
||||
sudo cp $systemd_service /etc/systemd/system/$app.service
|
||||
systemctl enable $app
|
||||
systemctl start $app
|
||||
systemd_service=../conf/kresus.service
|
||||
sed -i "s@YNH_HOME@$src_path@g" $systemd_service
|
||||
sed -i "s@YNH_WWW_PATH@$path@g" $systemd_service
|
||||
sudo cp $systemd_service /etc/systemd/system/$app.service
|
||||
systemctl enable $app
|
||||
systemctl start $app
|
||||
|
||||
# Reload services
|
||||
sudo service nginx reload
|
||||
sudo service nginx reload
|
||||
|
|
Loading…
Add table
Reference in a new issue