-
-
Save rainly/e0761a6ca90d985f324119dd00eb2bda to your computer and use it in GitHub Desktop.
auto enable/start sunlogin services and running, disable/stop services when exit sunlogin.
This file contains 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
#!/usr/bin/sudo bash | |
# | |
if [ "$EUID" -ne 0 ] | |
then echo "Please run as root" | |
exit | |
fi | |
systemctl enable runsunloginclient.service | |
systemctl start runsunloginclient.service | |
# change USERNAME to your current non-root username | |
sudo -u USERNAME /usr/local/sunlogin/bin/sunloginclient & | |
wait $! | |
systemctl stop runsunloginclient.service | |
systemctl disable runsunloginclient.service | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment