mirror of
https://github.com/YunoHost-Apps/opentracker_ynh.git
synced 2024-09-03 19:46:34 +02:00
set permissions
This commit is contained in:
parent
ec1906aab1
commit
9ec6fc0456
7 changed files with 13 additions and 9 deletions
|
@ -21,6 +21,10 @@ OpenTracker is a open and free bittorrent tracker project. It aims for minimal r
|
||||||
|
|
||||||
`udp://mydomain.com:6969`
|
`udp://mydomain.com:6969`
|
||||||
|
|
||||||
|
by default the tracker will run on 6969 port on both UDP and TCP.
|
||||||
|
|
||||||
|
visit `http://serverIP:6969/stats` to view the tracker stats.
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
* Official documentation: http://erdgeist.org/arts/software/opentracker/index/#overview
|
* Official documentation: http://erdgeist.org/arts/software/opentracker/index/#overview
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
;; Test complet
|
;; Test complet
|
||||||
; Manifest
|
; Manifest
|
||||||
domain="domain.tld" (DOMAIN)
|
domain="domain.tld" (DOMAIN)
|
||||||
path="/" (PATH)
|
path="/path" (PATH)
|
||||||
is_public=1 (PUBLIC|public=1|private=0)
|
is_public=1 (PUBLIC|public=1|private=0)
|
||||||
port="9980" (PORT)
|
port="9980" (PORT)
|
||||||
; Checks
|
; Checks
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=opentracker
|
Description=OpenTracker
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
User=admin
|
User=__APP__
|
||||||
Group=users
|
Group=__APP__
|
||||||
Type=simple
|
Type=simple
|
||||||
UMask=000
|
UMask=000
|
||||||
WorkingDirectory=__FINALPATH__
|
WorkingDirectory=__FINALPATH__
|
||||||
|
|
|
@ -35,7 +35,7 @@ app=$YNH_APP_INSTANCE_NAME
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Validating installation parameters..." --weight=1
|
ynh_script_progression --message="Validating installation parameters..." --weight=1
|
||||||
|
|
||||||
final_path=/home/admin/$app
|
final_path=/opt/$app
|
||||||
test ! -e "$final_path" || ynh_die "This path already contains a folder"
|
test ! -e "$final_path" || ynh_die "This path already contains a folder"
|
||||||
|
|
||||||
# Register (book) web path
|
# Register (book) web path
|
||||||
|
@ -113,7 +113,7 @@ ynh_add_systemd_config
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Set permissions to app files
|
# Set permissions to app files
|
||||||
chown -R admin:1007 $final_path
|
chown -R $app: $final_path
|
||||||
chmod +x $final_path/opentracker
|
chmod +x $final_path/opentracker
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -26,7 +26,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
# REMOVE SERVICE INTEGRATION IN YUNOHOST
|
# REMOVE SERVICE INTEGRATION IN YUNOHOST
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Remove the service from the list of services known by Yunohost (added from `yunohost service add`)
|
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
||||||
if ynh_exec_warn_less yunohost service status $app >/dev/null
|
if ynh_exec_warn_less yunohost service status $app >/dev/null
|
||||||
then
|
then
|
||||||
ynh_script_progression --message="Removing $app service integration..." --weight=1
|
ynh_script_progression --message="Removing $app service integration..." --weight=1
|
||||||
|
|
|
@ -68,7 +68,7 @@ ynh_system_user_create --username=$app
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Restore permissions on app files
|
# Restore permissions on app files
|
||||||
chown -R root: $final_path
|
chown -R $app: $final_path
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC RESTORATION
|
# SPECIFIC RESTORATION
|
||||||
|
|
|
@ -115,7 +115,7 @@ ynh_add_systemd_config
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Set permissions on app files
|
# Set permissions on app files
|
||||||
chown -R root: $final_path
|
chown -R $app: $final_path
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# INTEGRATE SERVICE IN YUNOHOST
|
# INTEGRATE SERVICE IN YUNOHOST
|
||||||
|
|
Loading…
Add table
Reference in a new issue