mirror of
https://framagit.org/YunoHost-Apps/gitea_ynh.git
synced 2024-11-21 18:41:35 +01:00
[fix] All scripts
This commit is contained in:
parent
c3699ac994
commit
ec92a25172
@ -12,9 +12,6 @@
|
|||||||
setup_private=1
|
setup_private=1
|
||||||
setup_public=1
|
setup_public=1
|
||||||
upgrade=1
|
upgrade=1
|
||||||
upgrade=1 from_commit=aa075b2051ffad7b0b6fef3a9c767376d5bdbfab
|
|
||||||
upgrade=1 from_commit=1cbec051e1171de5a8ed1e850eb4fb3506114da5
|
|
||||||
upgrade=1 from_commit=5a706ed246392c1ce39c47a648cb93e2996e80d3
|
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
multi_instance=1
|
multi_instance=1
|
||||||
incorrect_path=0
|
incorrect_path=0
|
||||||
@ -31,11 +28,4 @@
|
|||||||
Level 7=auto
|
Level 7=auto
|
||||||
Level 8=0
|
Level 8=0
|
||||||
Level 9=0
|
Level 9=0
|
||||||
Level 10=0
|
Level 10=0
|
||||||
;;; Upgrade options
|
|
||||||
; commit=aa075b2051ffad7b0b6fef3a9c767376d5bdbfab
|
|
||||||
name=Before multi_instance and refactoring
|
|
||||||
; commit=1cbec051e1171de5a8ed1e850eb4fb3506114da5
|
|
||||||
name=From V0.10.18
|
|
||||||
; commit=5a706ed246392c1ce39c47a648cb93e2996e80d3
|
|
||||||
name=The oldest package
|
|
@ -1,5 +1,5 @@
|
|||||||
SOURCE_URL=https://rafi59.codelib.re/git/attachments/94e2d077-3b5c-46c2-8a5b-6163f0675df5
|
SOURCE_URL=https://rafi59.codelib.re/git/attachments/e147665b-5547-4401-bb90-3f8f2eacdb30
|
||||||
SOURCE_SUM=232f91737438562362b9443727a849cbe0b111284258c1add170dc6327715c77
|
SOURCE_SUM=951fe16e5aacf578d39fb0da0b9c0b0d93cadb27fd733b3838a12964ca9669b7
|
||||||
# (Optional) Program to check the integrity (sha256sum, md5sum...)
|
# (Optional) Program to check the integrity (sha256sum, md5sum...)
|
||||||
# default: sha256
|
# default: sha256
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
SOURCE_URL=https://rafi59.codelib.re/git/attachments/07f43b21-cf3e-4d5b-9262-415399255f4f
|
SOURCE_URL=https://rafi59.codelib.re/git/attachments/9ac42714-14fb-4ab6-ad84-d91e51777070
|
||||||
SOURCE_SUM=ee997cc8511e70c7a4454fe4ea353a85c2f04baeb41a96c7acc7c78e9ee4db9f
|
SOURCE_SUM=68103f9dc86abf379717ac754f30b44b0512ac60906e12839dcd1b580012ebfb
|
||||||
# (Optional) Program to check the integrity (sha256sum, md5sum...)
|
# (Optional) Program to check the integrity (sha256sum, md5sum...)
|
||||||
# default: sha256
|
# default: sha256
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
SOURCE_URL=https://rafi59.codelib.re/git/attachments/5707d3d4-ece9-4724-8055-892bd89de3bb
|
SOURCE_URL=https://rafi59.codelib.re/git/attachments/c54bf3d7-1837-4129-82f7-1ea1aee48cf2
|
||||||
SOURCE_SUM=2917570f3f43e36daf6f473223630d31fdf81e36b12baeeb4b8c49b1240ed413
|
SOURCE_SUM=2f914fe40a5d337e29ddcd69dd97cba60c1373f5bcece0d4fecff86b0705eb58
|
||||||
# (Optional) Program to check the integrity (sha256sum, md5sum...)
|
# (Optional) Program to check the integrity (sha256sum, md5sum...)
|
||||||
# default: sha256
|
# default: sha256
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
|
@ -69,9 +69,9 @@ fi
|
|||||||
|
|
||||||
config_nginx
|
config_nginx
|
||||||
|
|
||||||
# Update gogs config
|
# Update gitea config
|
||||||
config_gogs
|
config_gitea
|
||||||
|
|
||||||
# RELOAD services
|
# RELOAD services
|
||||||
ynh_check_starting "INFO] Listen: http://0.0.0.0:" "/var/log/$app/gogs.log"
|
ynh_check_starting "INFO] Listen: http://0.0.0.0:" "/var/log/$app/gitea.log"
|
||||||
sleep 1
|
sleep 1
|
@ -112,4 +112,5 @@ ynh_use_logrotate "/var/log/$app"
|
|||||||
|
|
||||||
# Reload services
|
# Reload services
|
||||||
# ynh_check_starting "Serving [::]:$port with pid" "/var/log/$app/gitea.log"
|
# ynh_check_starting "Serving [::]:$port with pid" "/var/log/$app/gitea.log"
|
||||||
systemctl restart gitea
|
sleep 20
|
||||||
|
systemctl start gitea
|
||||||
|
@ -58,9 +58,10 @@ set_permission
|
|||||||
# Configure logrotate
|
# Configure logrotate
|
||||||
ynh_use_logrotate "/var/log/$app"
|
ynh_use_logrotate "/var/log/$app"
|
||||||
|
|
||||||
# Add Gogs to YunoHost's monitored services
|
# Add gitea to YunoHost's monitored services
|
||||||
yunohost service add "$app" --log /var/log/"$app"/"$app".log
|
yunohost service add "$app" --log /var/log/"$app"/"$app".log
|
||||||
|
|
||||||
# Reload services
|
# Reload services
|
||||||
systemctl reload nginx.service
|
systemctl reload nginx.service
|
||||||
# ynh_check_starting "INFO] Listen: http://0.0.0.0:" "/var/log/$app/gogs.log"
|
sleep 20
|
||||||
|
systemctl start gitea
|
@ -52,28 +52,28 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# handle upgrade from old package installation
|
# handle upgrade from old package installation
|
||||||
# this test that /etc/gogs exist since this was used in the old package
|
# this test that /etc/gitea exist since this was used in the old package
|
||||||
# but not in the new
|
# but not in the new
|
||||||
# this code will be removed in the future
|
# this code will be removed in the future
|
||||||
if [ -d "/etc/gogs" ]
|
if [ -d "/etc/gitea" ]
|
||||||
then
|
then
|
||||||
# create needed directories if not already created
|
# create needed directories if not already created
|
||||||
create_dir
|
create_dir
|
||||||
|
|
||||||
# move repositories to new dir
|
# move repositories to new dir
|
||||||
old_repo_path=$(ynh_app_setting_get "$app" repopath)
|
old_repo_path=$(ynh_app_setting_get "$app" repopath)
|
||||||
mv "${old_repo_path:-/home/yunohost.app/gogs}"/* "$REPO_PATH" || true # Avoid if the directory is empty
|
mv "${old_repo_path:-/home/yunohost.app/gitea}"/* "$REPO_PATH" || true # Avoid if the directory is empty
|
||||||
# cleanup old dir and conf
|
# cleanup old dir and conf
|
||||||
ynh_secure_remove /opt/gogs
|
ynh_secure_remove /opt/gitea
|
||||||
ynh_secure_remove /etc/gogs
|
ynh_secure_remove /etc/gitea
|
||||||
ynh_secure_remove /opt/gogs_src
|
ynh_secure_remove /opt/gitea_src
|
||||||
|
|
||||||
# create needed directories if not already created
|
# create needed directories if not already created
|
||||||
create_dir
|
create_dir
|
||||||
fi
|
fi
|
||||||
# end of old package upgrade
|
# end of old package upgrade
|
||||||
|
|
||||||
# test if user gogs is locked because of an old installation of the package.
|
# test if user gitea is locked because of an old installation of the package.
|
||||||
# if it's blocked, unlock it to allow ssh usage with git
|
# if it's blocked, unlock it to allow ssh usage with git
|
||||||
if [[ $(grep "$app" /etc/shadow | cut -d: -f2) == '!' ]]
|
if [[ $(grep "$app" /etc/shadow | cut -d: -f2) == '!' ]]
|
||||||
then
|
then
|
||||||
@ -85,13 +85,13 @@ fi
|
|||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Clean template to fix issue : https://github.com/gogits/gogs/issues/4585
|
# Clean template to fix issue : https://github.com/gogits/gogs/issues/4585
|
||||||
ynh_secure_remove "/opt/gogs/templates"
|
ynh_secure_remove "/opt/gitea/templates"
|
||||||
|
|
||||||
# Install Gogs
|
# Install gitea
|
||||||
ynh_setup_source $final_path $architecture
|
ynh_setup_source $final_path $architecture
|
||||||
|
|
||||||
# Configure gogs with app.ini file
|
# Configure gitea with app.ini file
|
||||||
config_gogs
|
config_gitea
|
||||||
|
|
||||||
# Configure init script
|
# Configure init script
|
||||||
ynh_add_systemd_config
|
ynh_add_systemd_config
|
||||||
@ -107,4 +107,6 @@ config_nginx
|
|||||||
set_permission
|
set_permission
|
||||||
|
|
||||||
# Reload services
|
# Reload services
|
||||||
# ynh_check_starting "INFO] Listen: http://0.0.0.0:" "/var/log/$app/gogs.log"
|
# ynh_check_starting "INFO] Listen: http://0.0.0.0:" "/var/log/$app/gitea.log"
|
||||||
|
sleep 20
|
||||||
|
systemctl restart gitea
|
||||||
|
Loading…
Reference in New Issue
Block a user