Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Daemon #127

Merged
merged 33 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
3291731
add schema
OniriCorpe Feb 13, 2024
fe2feac
add daemon
OniriCorpe Feb 13, 2024
95c7629
finalization
OniriCorpe Feb 13, 2024
625aa67
fixes
OniriCorpe Feb 13, 2024
f594bf4
systemd config renamed to $app-daemon
OniriCorpe Feb 13, 2024
fd9ec9d
fixes
OniriCorpe Feb 14, 2024
f28c50b
fixes
OniriCorpe Feb 14, 2024
054dd4f
gorgotten yunohost service remove "$app"
OniriCorpe Feb 14, 2024
8ebe3e8
fixes
OniriCorpe Feb 14, 2024
b928c94
fix StandardOutput
OniriCorpe Feb 14, 2024
b1590f2
fix this damn pidfile
OniriCorpe Feb 14, 2024
50fa4bd
better comment for posterity
OniriCorpe Feb 14, 2024
7dba646
fix yunohost service remove
OniriCorpe Feb 22, 2024
a7e5035
update config files
OniriCorpe Feb 22, 2024
57e53c5
fix domain name change
OniriCorpe Feb 22, 2024
22054c0
use the provided config file template at install
OniriCorpe Feb 22, 2024
aacafcc
Auto-update README
yunohost-bot Feb 22, 2024
ec21a5d
post install: show explicitely the admin login (email)
OniriCorpe Feb 22, 2024
f5d5479
Merge branch 'daemon' of https://github.com/YunoHost-Apps/friendica_y…
OniriCorpe Feb 22, 2024
4918295
trying to fix the systemd config
OniriCorpe Feb 22, 2024
e1351c6
fix pidfile config indentation
OniriCorpe Feb 22, 2024
5b13f2f
add log path
OniriCorpe Feb 22, 2024
acad23f
remove irrelevant comment
OniriCorpe Feb 22, 2024
ddc5300
delete an eventual remaining daemon.pid at restoration
OniriCorpe Feb 22, 2024
8e2d8b1
Merge branch 'testing' into daemon
OniriCorpe Feb 22, 2024
66fb7d4
fixes
OniriCorpe Feb 22, 2024
9dfb0f0
Merge branch 'daemon' of https://github.com/YunoHost-Apps/friendica_y…
OniriCorpe Feb 22, 2024
5f45866
fix a typo for all_users
OniriCorpe Feb 22, 2024
d579e03
adding comment: "Removing the cron..."
OniriCorpe Feb 22, 2024
c44d265
use ynh_secure_remove instead of rm
OniriCorpe Feb 22, 2024
619fca0
add pre upgrade message about the daemon
OniriCorpe Feb 22, 2024
6512a49
fix service name
OniriCorpe Feb 22, 2024
ff61865
comment
OniriCorpe Feb 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions conf/systemd.service
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ PrivateTmp=true
InaccessibleDirectories=/home /root /boot /opt /mnt /media
ReadOnlyDirectories=/etc /usr
Restart=always
StartLimitBurst=2
StartLimitInterval=5

# Sandboxing options to harden security
# Depending on specificities of your service/app, you may need to tweak these
Expand Down
8 changes: 7 additions & 1 deletion scripts/install
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,15 @@ pushd "$install_dir"

# Enable LDAP Auth addon
ynh_exec_as "$app" "php$phpversion" bin/console.php addon enable ldapauth

popd

# add the path to the pidfile (we can't do that using the autoinstall)
# in fact we can using 'autoinstall -f <prepared.config.php>' but i'm tired
OniriCorpe marked this conversation as resolved.
Show resolved Hide resolved
if [ -f "$install_dir/config/local.config.php" ] && ! grep -q -e "pidfile" "$install_dir/config/local.config.php"; then
ynh_replace_string --match_string="'basepath' => '$install_dir'," --replace_string="'basepath' => '$install_dir', 'pidfile' => '$install_dir/daemon.pid'," --target_file="$install_dir/config/local.config.php"
ynh_store_file_checksum --file="$install_dir/config/local.config.php"
fi

#=================================================
# START SYSTEMD SERVICE
#=================================================
Expand Down
1 change: 1 addition & 0 deletions scripts/restore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ ynh_script_progression --message="Restoring the app main directory..." --weight=

ynh_restore_file --origin_path="$install_dir"

chmod -R o-rwx "$install_dir"
chown -R "$app:www-data" "$install_dir"
chmod -R 775 "$install_dir/view/smarty3"

Expand Down
6 changes: 6 additions & 0 deletions scripts/upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ if [ -f "$install_dir/config/local.config.php" ] && ! grep -q -e "'url' => 'http
ynh_store_file_checksum --file="$install_dir/config/local.config.php"
fi

# add the path to the pidfile if missing
if [ -f "$install_dir/config/local.config.php" ] && ! grep -q -e "pidfile" "$install_dir/config/local.config.php"; then
ynh_replace_string --match_string="'basepath' => '$install_dir'," --replace_string="'basepath' => '$install_dir', 'pidfile' => '$install_dir/daemon.pid'," --target_file="$install_dir/config/local.config.php"
ynh_store_file_checksum --file="$install_dir/config/local.config.php"
fi

#=================================================
# STORE THE CONFIG FILE CHECKSUM
#=================================================
Expand Down