|
@ -27,7 +27,7 @@ WantedBy=multi-user.target' |
|
|
file_c=$(printf "$file_c" | sed s/'gamename'/$gamename/g | sed "s|path|$path|g" | sed s/'whoami'/$(whoami)/g) |
|
|
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_ok_nl "Generated the file contents" |
|
|
fn_print_information_nl "Enter the password of root:" |
|
|
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 |
|
|
su -c "echo \"$file_c\" > /etc/systemd/system/${selfname}-lgsm.service" || return 1 && return 0 |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
fn_install_systemd |
|
|
fn_install_systemd |
|
@ -36,8 +36,8 @@ then |
|
|
fn_print_error_nl "su exited with non 0 exit code.. something went wrong"; |
|
|
fn_print_error_nl "su exited with non 0 exit code.. something went wrong"; |
|
|
fn_script_log_fatal "su exited with non 0 exit code." |
|
|
fn_script_log_fatal "su exited with non 0 exit code." |
|
|
else |
|
|
else |
|
|
fn_print_complete_nl "Placed the file in /usr/lib/systemd/system/ as ${selfname}-lgsm.service" |
|
|
fn_print_complete_nl "Placed the file in /etc/systemd/system/ as ${selfname}-lgsm.service" |
|
|
fn_print_information_nl "run \`systemctl enable ${selfname}-lgsm.service\`, to enable the game on boot" |
|
|
fn_print_information_nl "run \`systemctl enable ${selfname}-lgsm.service\` (as root), to enable the game on boot" |
|
|
fn_script_log_pass "sucessfullly installed the systemd service file" |
|
|
fn_script_log_pass "sucessfullly installed the systemd service file" |
|
|
fi |
|
|
fi |
|
|
core_exit.sh |
|
|
core_exit.sh |
|
|