mirror of
https://github.com/partitioncloud/partitioncloud-server.git
synced 2025-01-23 17:26:26 +01:00
Automatically add new user (root:root) on init
This commit is contained in:
parent
46684a0f7e
commit
037756b323
9
make.sh
9
make.sh
@ -6,13 +6,16 @@ init () {
|
||||
mkdir -p "partitioncloud/search-partitions"
|
||||
mkdir -p "partitioncloud/static/thumbnails"
|
||||
mkdir -p "partitioncloud/static/search-thumbnails"
|
||||
if [ ! -x instance/partitioncloud.sqlite ]; then
|
||||
|
||||
if test -f "instance/partitioncloud.sqlite"; then
|
||||
printf "Souhaitez vous supprimer la base de données existante ? [y/n] "
|
||||
read -r CONFIRMATION
|
||||
fi
|
||||
[[ $CONFIRMATION == y ]] || exit 1
|
||||
fi
|
||||
sqlite3 "instance/partitioncloud.sqlite" '.read partitioncloud/schema.sql'
|
||||
echo "Base de données initialisée"
|
||||
echo "Base de données créé"
|
||||
sqlite3 "instance/partitioncloud.sqlite" '.read partitioncloud/init.sql'
|
||||
echo "Utilisateur root:root ajouté"
|
||||
}
|
||||
|
||||
start () {
|
||||
|
4
partitioncloud/init.sql
Normal file
4
partitioncloud/init.sql
Normal file
@ -0,0 +1,4 @@
|
||||
-- SQLite
|
||||
-- Users
|
||||
INSERT INTO user (username, password, access_level)
|
||||
VALUES ('root', 'pbkdf2:sha256:260000$DzMbmkbgVJ0JoQa3$4b42c5a5135668ae5e5754fa4f0ac136ece8f59e8d751008bd533b6c9426c9ff', 1);
|
Loading…
Reference in New Issue
Block a user