Browse Source

Change nextcloud password

Bob Mottram 8 years ago
parent
commit
a3025cc142
1 changed files with 8 additions and 0 deletions
  1. 8
    0
      src/freedombone-app-nextcloud

+ 8
- 0
src/freedombone-app-nextcloud View File

65
     echo '0'
65
     echo '0'
66
 }
66
 }
67
 
67
 
68
+function change_password_nextcloud {
69
+    curr_username="$1"
70
+
71
+    export OC_PASS="$2"
72
+    su -s /bin/sh www-data -c "php occ user:resetpassword --password-from-env $curr_username"
73
+    export OC_PASS=""
74
+}
75
+
68
 function install_interactive_nextcloud {
76
 function install_interactive_nextcloud {
69
     if [ ! $ONION_ONLY ]; then
77
     if [ ! $ONION_ONLY ]; then
70
         ONION_ONLY='no'
78
         ONION_ONLY='no'