-
-
Notifications
You must be signed in to change notification settings - Fork 844
feat(command) adds a command to place the systemd service file in the right location #3125
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
Open
legendofmiracles
wants to merge
36
commits into
GameServerManagers:develop
Choose a base branch
from
legendofmiracles:master
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
9c41b66
Merge branch 'release/v20.6.0' into develop
dgibbs64 63f30ae
Merge branch 'hotfix/v20.6.1' into develop
dgibbs64 7b65817
Merge branch 'hotfix/v20.6.2' into develop
dgibbs64 37d9d8e
release v20.6.2
dgibbs64 5da8985
feat: adds a command to place the systemd service file in the right l…
legendofmiracles 05e236f
fix(stop) stop will clear tmux text before entering stop command (#3142)
unknowntrojan dc6b037
fix(update): redo steamcmd update part for new behavoir (#3139)
h3o66 55b3bbe
fix(bmdm): add missing dependency ncurses libs (#3138)
h3o66 5d58dcf
fix(minecraft): fix java ram assignment (#3147)
h3o66 d0ecddf
feat(config): add secrets config to store sensitive settings (#3080)
dgibbs64 9a85063
feat(newserver): Colony Survival (#3075)
h3o66 4981393
change the shebang and adds the usual description of the file
legendofmiracles efa159d
feat(skeleton): New command skeleton (#3152)
dgibbs64 a075300
feat(check-update): add new command check-update for steamcmd game se…
h3o66 bf292f8
replace the file with /usr/lib/ with /etc/
legendofmiracles e9dbda7
fix(steamcmd): retries are not honored if install succeeds (#3155)
h3o66 ede205a
feat: refactor check_config removing some game specific code (#3160)
dgibbs64 16e58f1
fix(gmod): update link for wiki page (#3165)
h3o66 681d878
fix(steamcmd): fix branch switch (#3168)
h3o66 6e40de6
Merge branch 'develop' into master
dgibbs64 223b076
feat(newserver): Vintage Story (#3156)
h3o66 05e4570
feat(newserver): SCP: Secret Laboratory (#3163)
h3o66 9cc0b3d
fix(rust): server config text change for rcon (#3175)
h3o66 cee98dc
fix(steamcmd): remove unused parameter (#3170)
h3o66 7eb060a
uses sudo instead of su and more helpful on errors
legendofmiracles a86fa1b
Merge branch 'develop' into master
legendofmiracles 778494c
fix(rust): wipe command does not wipe all sav files (#3183)
h3o66 706bc35
feat(dev): add libc++.so.1 for dependency detection (#3181)
h3o66 e096d3a
fix(pvr): add new dependency (#3180)
h3o66 1f821f9
fix(inss): fix config to only use parameter (#3179)
h3o66 50cd3d8
fix(steamcmd): fix update on start not starting the server (#3169)
h3o66 892eec8
Merge remote-tracking branch 'legendofmiracles/master' into systemd
dgibbs64 add3a5c
feat(steamcmd): set platformtype for steamcmd in the default config f…
h3o66 45f91d2
fix(steamcmd): add dependency SDL 32bit for debian and ubuntu (#3186)
h3o66 f449154
fix(stop): change csgoserver stop mode (#3171)
h3o66 59ecfcf
Merge branch 'develop' into master
dgibbs64 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/usr/bin/env bash | ||
commandname="INITSYSTEM" | ||
commandaction="systemd service file" | ||
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" | ||
fn_firstcommand_set | ||
|
||
fn_install_systemd() { | ||
file_c=$'[Unit] | ||
Description=LinuxGSM gamename Server | ||
After=network-online.target | ||
Wants=network-online.target | ||
|
||
[Service] | ||
Type=forking | ||
User=whoami | ||
ExecStart=path start | ||
ExecStop=path stop | ||
Restart=no | ||
RemainAfterExit=yes | ||
|
||
[Install] | ||
WantedBy=multi-user.target' | ||
file_c=$(printf "$file_c" | sed s/'gamename'/$gamename/g | sed "s|path|$path|g" | sed s/'whoami'/$(whoami)/g) | ||
fn_print_ok_nl "Generated the file contents" | ||
fn_print_information_nl "Enter the password of root:" | ||
su -c "echo \"$file_c\" > /usr/lib/systemd/system/${selfname}-lgsm.service" || return 1 && return 0 | ||
} | ||
|
||
fn_install_systemd | ||
if [ $? -eq 1 ] | ||
then | ||
fn_print_error_nl "su exited with non 0 exit code.. something went wrong"; | ||
legendofmiracles marked this conversation as resolved.
Show resolved
Hide resolved
|
||
fn_script_log_fatal "su exited with non 0 exit code." | ||
else | ||
fn_print_complete_nl "Placed the file in /usr/lib/systemd/system/ as ${selfname}-lgsm.service" | ||
fn_print_information_nl "run \`systemctl enable ${selfname}-lgsm.service\`, to enable the game on boot" | ||
fn_script_log_pass "sucessfullly installed the systemd service file" | ||
legendofmiracles marked this conversation as resolved.
Show resolved
Hide resolved
|
||
fi | ||
core_exit.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.