Skip to content

Commit

Permalink
watcher pw reset msg (#1464)
Browse files Browse the repository at this point in the history
* check result of system cmds

* shorten

Co-authored-by: brian crabtree <[email protected]>
  • Loading branch information
tehn and tehn authored Oct 16, 2021
1 parent 914f769 commit 1b8c88f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions watcher/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ int main(void) {
printf("watcher\n");

if(access("/boot/norns.txt", F_OK)==0) {
system("echo 'we:sleep' | sudo chpasswd");
system("sudo rm /boot/norns.txt");
int r = system("echo 'we:sleep' | sudo chpasswd");
r |= system("sudo rm /boot/norns.txt");
fprintf(stderr, "password reset: %d\n", r);
}

int fd;
Expand Down

0 comments on commit 1b8c88f

Please sign in to comment.