-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
19 additions
and
24 deletions.
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,34 +2,35 @@ | |
|
||
source non_sudo_check.sh | ||
|
||
SERVICE_INSTALL_FILE_NAME="[email protected]" | ||
SERVICE_INSTANCE_FILE_NAME="asus_wmi_hotkeys_driver@$USER.service" | ||
SERVICE_INSTALL_FILE_NAME="asus_wmi_hotkeys_driver.service" | ||
SERVICE_INSTANCE_FILE_NAME="asus_wmi_hotkeys_driver.service" | ||
SERVICE_INSTALL_DIR_PATH="/lib/systemd/system" | ||
|
||
systemctl --user stop "$SERVICE_INSTANCE_FILE_NAME" | ||
sudo systemctl stop "$SERVICE_INSTANCE_FILE_NAME" | ||
if [[ $? != 0 ]] | ||
then | ||
echo "Something went wrong when stopping the $SERVICE_INSTANCE_FILE_NAME" | ||
else | ||
echo "Service $SERVICE_INSTANCE_FILE_NAME stopped" | ||
fi | ||
|
||
systemctl --user disable "$SERVICE_INSTANCE_FILE_NAME" | ||
sudo systemctl disable "$SERVICE_INSTANCE_FILE_NAME" | ||
if [[ $? != 0 ]] | ||
then | ||
echo "Something went wrong when disabling the $SERVICE_INSTANCE_FILE_NAME" | ||
else | ||
echo "Service $SERVICE_INSTANCE_FILE_NAME disabled" | ||
fi | ||
|
||
sudo rm -f "/usr/lib/systemd/user/$SERVICE_INSTALL_FILE_NAME" | ||
sudo rm -f "$SERVICE_INSTALL_DIR_PATH/$SERVICE_INSTALL_FILE_NAME" | ||
if [[ $? != 0 ]] | ||
then | ||
echo "Something went wrong when removing the $SERVICE_INSTALL_FILE_NAME" | ||
echo "Something went wrong when removing the $SERVICE_INSTALL_DIR_PATH/$SERVICE_INSTALL_FILE_NAME" | ||
else | ||
echo "Service $SERVICE_INSTALL_FILE_NAME removed" | ||
echo "Service $SERVICE_INSTALL_DIR_PATH/$SERVICE_INSTALL_FILE_NAME removed" | ||
fi | ||
|
||
systemctl --user daemon-reload | ||
sudo systemctl daemon-reload | ||
|
||
if [[ $? != 0 ]]; then | ||
echo "Something went wrong when was called systemctl daemon reload" | ||
|