diff --git a/conf/activate_plugins.sql b/conf/activate_plugins.sql new file mode 100644 index 0000000..19ea0da --- /dev/null +++ b/conf/activate_plugins.sql @@ -0,0 +1,3 @@ +INSERT INTO `yourls_options` ( `option_name`, `option_value`) VALUES +('active_plugins', 'a:1:{i:0;s:24:"yunohost_auth/plugin.php";}'); + diff --git a/conf/config.php b/conf/config.php index f1e8f35..a360aef 100644 --- a/conf/config.php +++ b/conf/config.php @@ -57,7 +57,7 @@ define( 'YOURLS_COOKIEKEY', 'modify this text with something random' ); ** YOURLS will auto encrypt plain text passwords in this file ** Read http://yourls.org/userpassword for more information */ $yourls_user_passwords = array( - 'yourlsuser' => 'yourlspass' // You can have one or more 'login'=>'password' lines + // 'yourlsuser' => 'yourlspass' // You can have one or more 'login'=>'password' lines ); /** Debug mode to output some internal information @@ -88,3 +88,5 @@ $yourls_reserved_URL = array( ** Personal settings would go after here. */ +define( 'YOURLS_YUNOHOST_AUTH_ADMIN', 'yourlsuser' ); + diff --git a/conf/yunohost_auth/plugin.php b/conf/yunohost_auth/plugin.php new file mode 100644 index 0000000..e684c9d --- /dev/null +++ b/conf/yunohost_auth/plugin.php @@ -0,0 +1,21 @@ + /dev/null 2>&1 + +# Activate auth plugin +mysql -u $db_user -p$db_pwd $db_user < ../conf/activate_plugins.sql + +#sudo yunohost app setting yourls skipped_uris -d +#sudo yunohost app setting yourls unprotected_uris -v "/admin" + +sudo service nginx reload +sudo yunohost app ssowatconf +