소스 검색

Change nextcloud password

Bob Mottram 8 년 전
부모
커밋
a3025cc142
1개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 8
    0
      src/freedombone-app-nextcloud

+ 8
- 0
src/freedombone-app-nextcloud 파일 보기

@@ -65,6 +65,14 @@ function add_user_nextcloud {
65 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 76
 function install_interactive_nextcloud {
69 77
     if [ ! $ONION_ONLY ]; then
70 78
         ONION_ONLY='no'